summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorMing Lei2017-11-08 02:11:22 +0100
committerJens Axboe2017-11-11 03:53:25 +0100
commit0c6af1ccd5fd9ac640aef01c8de0043837451a04 (patch)
treee367c79457485a183e6231868fa5fb8fce2b2e40 /block
parentblock: pass full fmode_t to blk_verify_command (diff)
downloadkernel-qcow2-linux-0c6af1ccd5fd9ac640aef01c8de0043837451a04.tar.gz
kernel-qcow2-linux-0c6af1ccd5fd9ac640aef01c8de0043837451a04.tar.xz
kernel-qcow2-linux-0c6af1ccd5fd9ac640aef01c8de0043837451a04.zip
blk-mq: put driver tag if dispatch budget can't be got
We have to put the driver tag if dispatch budget can't be got, otherwise it might cause IO deadlock, especially in case that size of tags is very small. Fixes: de1482974080(blk-mq: introduce .get_budget and .put_budget in blk_mq_ops) Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r--block/blk-mq.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index c501cbd0de93..3d759bb8a5bb 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1080,8 +1080,10 @@ bool blk_mq_dispatch_rq_list(struct request_queue *q, struct list_head *list,
}
}
- if (!got_budget && !blk_mq_get_dispatch_budget(hctx))
+ if (!got_budget && !blk_mq_get_dispatch_budget(hctx)) {
+ blk_mq_put_driver_tag(rq);
break;
+ }
list_del_init(&rq->queuelist);