]> git.hungrycats.org Git - linux/commitdiff
[PATCH] disk stats accounting fix
authorJens Axboe <axboe@suse.de>
Thu, 10 Jul 2003 17:06:52 +0000 (10:06 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Thu, 10 Jul 2003 17:06:52 +0000 (10:06 -0700)
We should only account file system requests, ones originating from
__make_request(). Otherwise it skews the counters and they go negative
really fast.

drivers/block/ll_rw_blk.c

index f03a77be82b6367f817da51d5b6a6b3137bd5450..29e94321f8ffa74df8a7bb97cd8fa8a5941f8d7f 100644 (file)
@@ -2354,7 +2354,7 @@ void end_that_request_last(struct request *req)
        struct gendisk *disk = req->rq_disk;
        struct completion *waiting = req->waiting;
 
-       if (disk) {
+       if (disk && blk_fs_request(req)) {
                unsigned long duration = jiffies - req->start_time;
                switch (rq_data_dir(req)) {
                    case WRITE: