summaryrefslogtreecommitdiffstats
path: root/block/blk-mq.c
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2021-12-06 12:12:13 +0100
committerJens Axboe <axboe@kernel.dk>2021-12-06 17:40:42 +0100
commit41adf531e390e7969f00a560b8971cbf42f5a6da (patch)
tree932344cea4539f1f795a8c5ecd2f965367df69e0 /block/blk-mq.c
parentblk-mq: run dispatch lock once in case of issuing from list (diff)
downloadlinux-41adf531e390e7969f00a560b8971cbf42f5a6da.tar.xz
linux-41adf531e390e7969f00a560b8971cbf42f5a6da.zip
blk-mq: don't run might_sleep() if the operation needn't blocking
The operation protected via blk_mq_run_dispatch_ops() in blk_mq_run_hw_queue won't sleep, so don't run might_sleep() for it. Reported-and-tested-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r--block/blk-mq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 22ec21aa0c22..706e9a836fe6 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2048,7 +2048,7 @@ void blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async)
* And queue will be rerun in blk_mq_unquiesce_queue() if it is
* quiesced.
*/
- blk_mq_run_dispatch_ops(hctx->queue,
+ __blk_mq_run_dispatch_ops(hctx->queue, false,
need_run = !blk_queue_quiesced(hctx->queue) &&
blk_mq_hctx_has_pending(hctx));