From: Christoph Hellwig Date: Tue, 1 Nov 2022 15:00:46 +0000 (+0100) Subject: blk-mq: skip non-mq queues in blk_mq_quiesce_queue X-Git-Tag: for-6.2/block-2022-12-08~115 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=8537380bb9882c201db60a1eb201aac6e74083e8;p=linux-block.git blk-mq: skip non-mq queues in blk_mq_quiesce_queue For submit_bio based queues there is no (S)RCU critical section during I/O submission and thus nothing to wait for in blk_mq_wait_quiesce_done, so skip doing any synchronization. No non-mq driver should be calling this, but for now we have core callers that unconditionally call into it. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Ming Lei Reviewed-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20221101150050.3510-11-hch@lst.de Signed-off-by: Jens Axboe --- diff --git a/block/blk-mq.c b/block/blk-mq.c index a78538586a40..a03abadfe4c6 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -280,7 +280,9 @@ EXPORT_SYMBOL_GPL(blk_mq_wait_quiesce_done); void blk_mq_quiesce_queue(struct request_queue *q) { blk_mq_quiesce_queue_nowait(q); - blk_mq_wait_quiesce_done(q); + /* nothing to wait for non-mq queues */ + if (queue_is_mq(q)) + blk_mq_wait_quiesce_done(q); } EXPORT_SYMBOL_GPL(blk_mq_quiesce_queue);