Skip to content

Commit

Permalink
blk: move blk_delete_timer call in end_that_request_last
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mike Anderson authored and Jens Axboe committed Nov 6, 2008
1 parent 2920ebb commit e78042e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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
Expand Down

0 comments on commit e78042e

Please sign in to comment.