/* yaffs2_update_oldest_dirty_seq() Update the oldest dirty sequence number whenever we dirty a block. Only do this if the oldest_dirty_seq is actually being tracked.  */
void yaffs2_update_oldest_dirty_seq(struct yaffs_dev *dev, unsigned block_no, struct yaffs_block_info *bi)
/* yaffs2_update_oldest_dirty_seq() Update the oldest dirty sequence number whenever we dirty a block. Only do this if the oldest_dirty_seq is actually being tracked.  */
void yaffs2_update_oldest_dirty_seq(struct yaffs_dev *dev, unsigned block_no, struct yaffs_block_info *bi)
{
	if (!dev->param.is_yaffs2)
		return;
	if (dev->oldest_dirty_seq) {
		if (dev->oldest_dirty_seq > bi->seq_number) {
			dev->oldest_dirty_seq = bi->seq_number;
			dev->oldest_dirty_block = block_no;
		}
	}
}