/* yaffs_clear_oldest_dirty_seq() Called when a block is erased or marked bad. (ie. when its seq_number becomes invalid). If the value matches the oldest then we clear dev->oldest_dirty_seq to force its recomputation.  */
void yaffs2_clear_oldest_dirty_seq(struct yaffs_dev *dev, struct yaffs_block_info *bi)
/* yaffs_clear_oldest_dirty_seq() Called when a block is erased or marked bad. (ie. when its seq_number becomes invalid). If the value matches the oldest then we clear dev->oldest_dirty_seq to force its recomputation.  */
void yaffs2_clear_oldest_dirty_seq(struct yaffs_dev *dev, struct yaffs_block_info *bi)
{
	if (!dev->param.is_yaffs2)
		return;
	if (!bi || bi->seq_number == dev->oldest_dirty_seq) {
		dev->oldest_dirty_seq = 0;
		dev->oldest_dirty_block = 0;
	}
}