block: fix blk_abort_request for blk-mq drivers

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>
This commit is contained in:
Christoph Hellwig 2015-10-30 20:47:04 +08:00 committed by Jens Axboe
parent bf508e910b
commit 55ce0da1da
1 changed files with 5 additions and 3 deletions

View File

@ -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);