diff options
Diffstat (limited to 'drivers/block/ll_rw_blk.c')
-rw-r--r-- | drivers/block/ll_rw_blk.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c index 0f64ee7d8d27..ac31ea170058 100644 --- a/drivers/block/ll_rw_blk.c +++ b/drivers/block/ll_rw_blk.c | |||
@@ -2433,13 +2433,15 @@ 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 (now == disk->stamp) |
2437 | disk->in_flight * (now - disk->stamp)); | 2437 | return; |
2438 | disk->stamp = now; | ||
2439 | 2438 | ||
2440 | if (disk->in_flight) | 2439 | if (disk->in_flight) { |
2441 | __disk_stat_add(disk, io_ticks, (now - disk->stamp_idle)); | 2440 | __disk_stat_add(disk, time_in_queue, |
2442 | disk->stamp_idle = now; | 2441 | disk->in_flight * (now - disk->stamp)); |
2442 | __disk_stat_add(disk, io_ticks, (now - disk->stamp)); | ||
2443 | } | ||
2444 | disk->stamp = now; | ||
2443 | } | 2445 | } |
2444 | 2446 | ||
2445 | /* | 2447 | /* |