Skip to content

Commit

Permalink
block: fix blk_abort_request for blk-mq drivers
Browse files Browse the repository at this point in the history
We only added the request to the request list for the !blk-mq case,
so we should only delete it in that case as well.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Nov 24, 2015
1 parent bf508e9 commit 55ce0da
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions block/blk-timeout.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,13 @@ void blk_abort_request(struct request *req)
{
if (blk_mark_rq_complete(req))
return;
blk_delete_timer(req);
if (req->q->mq_ops)

if (req->q->mq_ops) {
blk_mq_rq_timed_out(req, false);
else
} else {
blk_delete_timer(req);
blk_rq_timed_out(req);
}
}
EXPORT_SYMBOL_GPL(blk_abort_request);

Expand Down

0 comments on commit 55ce0da

Please sign in to comment.