summaryrefslogtreecommitdiff
path: root/block/blk-mq.c
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2021-10-26 16:22:57 +0800
committerJens Axboe <axboe@kernel.dk>2021-10-26 08:38:11 -0600
commitff1552232b3612edff43a95746a4e78e231ef3d4 (patch)
tree471881aa06bfa9a9fe5efb9f061b8de642ebc852 /block/blk-mq.c
parent9f8b93a7df4d8e1e8715fb2a45a893cffad9da0b (diff)
downloadlwn-ff1552232b3612edff43a95746a4e78e231ef3d4.tar.gz
lwn-ff1552232b3612edff43a95746a4e78e231ef3d4.zip
blk-mq: don't issue request directly in case that current is to be blocked
When flushing plug list in case that current will be blocked, we can't issue request directly because ->queue_rq() may sleep, otherwise scheduler may complain. Fixes: dc5fc361d891 ("block: attempt direct issue of plug list") Signed-off-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20211026082257.2889890-1-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 c19dfa8ea65e..9840b15f505b 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2223,7 +2223,7 @@ void blk_mq_flush_plug_list(struct blk_plug *plug, bool from_schedule)
return;
plug->rq_count = 0;
- if (!plug->multiple_queues && !plug->has_elevator) {
+ if (!plug->multiple_queues && !plug->has_elevator && !from_schedule) {
blk_mq_plug_issue_direct(plug, from_schedule);
if (rq_list_empty(plug->mq_list))
return;