]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
block: fix blk_abort_request for blk-mq drivers
authorChristoph Hellwig <hch@lst.de>
Fri, 30 Oct 2015 12:47:04 +0000 (20:47 +0800)
committerJens Axboe <axboe@fb.com>
Tue, 24 Nov 2015 22:24:10 +0000 (15:24 -0700)
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>
block/blk-timeout.c

index 246dfb16c3d988c4f84749065a66977b825c98b5..aa40aa93381b661b73d5aa0f531e247e148c56a0 100644 (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);