[patch] remove gendisk->stamp_idle field

struct gendisk has these two fields: stamp, stamp_idle.  Update to
stamp_idle is always in sync with stamp and they are always the same.
Therefore, it does not add any value in having two fields tracking
same timestamp.  Suggest to remove it.

Also, we should only update gendisk stats with non-zero value.
Advantage is that we don't have to needlessly calculate memory address,
and then add zero to the content.

Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
Signed-off-by: Jens Axboe <axboe@suse.de>
This commit is contained in:
Chen, Kenneth W
2005-10-13 21:48:42 +02:00
committed by Jens Axboe
parent 741b2252a5
commit 20e5c81fcf
3 changed files with 7 additions and 8 deletions

View File

@@ -430,7 +430,7 @@ void del_gendisk(struct gendisk *disk)
disk->flags &= ~GENHD_FL_UP;
unlink_gendisk(disk);
disk_stat_set_all(disk, 0);
disk->stamp = disk->stamp_idle = 0;
disk->stamp = 0;
devfs_remove_disk(disk);