Skip to content

Commit 8537380

Browse files
Christoph Hellwigaxboe
authored andcommitted
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 <[email protected]> Reviewed-by: Keith Busch <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Ming Lei <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 2b4c235 commit 8537380

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

block/blk-mq.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,9 @@ EXPORT_SYMBOL_GPL(blk_mq_wait_quiesce_done);
280280
void blk_mq_quiesce_queue(struct request_queue *q)
281281
{
282282
blk_mq_quiesce_queue_nowait(q);
283-
blk_mq_wait_quiesce_done(q);
283+
/* nothing to wait for non-mq queues */
284+
if (queue_is_mq(q))
285+
blk_mq_wait_quiesce_done(q);
284286
}
285287
EXPORT_SYMBOL_GPL(blk_mq_quiesce_queue);
286288

0 commit comments

Comments
 (0)