summaryrefslogtreecommitdiffstats
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorMike Anderson <andmike@linux.vnet.ibm.com>2008-10-30 10:16:20 +0100
committerJens Axboe <jens.axboe@oracle.com>2008-11-06 08:41:56 +0100
commite78042e5b83936b1d12a4b5bbb492bdd88ad76c6 (patch)
treebd65da0f0f87c844fb4a22c5c56822a5ff15165b /block/blk-core.c
parentblock: add timer on blkdev_dequeue_request() not elv_next_request() (diff)
downloadlinux-e78042e5b83936b1d12a4b5bbb492bdd88ad76c6.tar.xz
linux-e78042e5b83936b1d12a4b5bbb492bdd88ad76c6.zip
blk: move blk_delete_timer call in end_that_request_last
Move the calling blk_delete_timer to later in end_that_request_last to address an issue where blkdev_dequeue_request may have add a timer for the request. Signed-off-by: Mike Anderson <andmike@linux.vnet.ibm.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index c3df30cfb3fc..10e8a64a5a5b 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1770,8 +1770,6 @@ static void end_that_request_last(struct request *req, int error)
{
struct gendisk *disk = req->rq_disk;
- blk_delete_timer(req);
-
if (blk_rq_tagged(req))
blk_queue_end_tag(req->q, req);
@@ -1781,6 +1779,8 @@ static void end_that_request_last(struct request *req, int error)
if (unlikely(laptop_mode) && blk_fs_request(req))
laptop_io_completion();
+ blk_delete_timer(req);
+
/*
* Account IO completion. bar_rq isn't accounted as a normal
* IO on queueing nor completion. Accounting the containing