aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/block/ll_rw_blk.c11
-rw-r--r--fs/partitions/check.c2
-rw-r--r--include/linux/genhd.h2
3 files changed, 7 insertions, 8 deletions
diff --git a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c
index baedac522945..c42071fd2e95 100644
--- a/drivers/block/ll_rw_blk.c
+++ b/drivers/block/ll_rw_blk.c
@@ -2433,13 +2433,12 @@ void disk_round_stats(struct gendisk *disk)
2433{ 2433{
2434 unsigned long now = jiffies; 2434 unsigned long now = jiffies;
2435 2435
2436 __disk_stat_add(disk, time_in_queue, 2436 if (disk->in_flight) {
2437 disk->in_flight * (now - disk->stamp)); 2437 __disk_stat_add(disk, time_in_queue,
2438 disk->in_flight * (now - disk->stamp));
2439 __disk_stat_add(disk, io_ticks, (now - disk->stamp));
2440 }
2438 disk->stamp = now; 2441 disk->stamp = now;
2439
2440 if (disk->in_flight)
2441 __disk_stat_add(disk, io_ticks, (now - disk->stamp_idle));
2442 disk->stamp_idle = now;
2443} 2442}
2444 2443
2445/* 2444/*
diff --git a/fs/partitions/check.c b/fs/partitions/check.c
index 77e178f13162..1e848648a322 100644
--- a/fs/partitions/check.c
+++ b/fs/partitions/check.c
@@ -430,7 +430,7 @@ void del_gendisk(struct gendisk *disk)
430 disk->flags &= ~GENHD_FL_UP; 430 disk->flags &= ~GENHD_FL_UP;
431 unlink_gendisk(disk); 431 unlink_gendisk(disk);
432 disk_stat_set_all(disk, 0); 432 disk_stat_set_all(disk, 0);
433 disk->stamp = disk->stamp_idle = 0; 433 disk->stamp = 0;
434 434
435 devfs_remove_disk(disk); 435 devfs_remove_disk(disk);
436 436
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 01796c41c951..142e1c1e0689 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -119,7 +119,7 @@ struct gendisk {
119 int policy; 119 int policy;
120 120
121 atomic_t sync_io; /* RAID */ 121 atomic_t sync_io; /* RAID */
122 unsigned long stamp, stamp_idle; 122 unsigned long stamp;
123 int in_flight; 123 int in_flight;
124#ifdef CONFIG_SMP 124#ifdef CONFIG_SMP
125 struct disk_stats *dkstats; 125 struct disk_stats *dkstats;