Skip to content

Commit a24e10a

Browse files
Ming Leigregkh
authored andcommitted
dm rq: don't call blk_mq_queue_stopped() in dm_stop_queue()
[ Upstream commit e766668 ] dm_stop_queue() only uses blk_mq_quiesce_queue() so it doesn't formally stop the blk-mq queue; therefore there is no point making the blk_mq_queue_stopped() check -- it will never be stopped. In addition, even though dm_stop_queue() actually tries to quiesce hw queues via blk_mq_quiesce_queue(), checking with blk_queue_quiesced() to avoid unnecessary queue quiesce isn't reliable because: the QUEUE_FLAG_QUIESCED flag is set before synchronize_rcu() and dm_stop_queue() may be called when synchronize_rcu() from another blk_mq_quiesce_queue() is in-progress. Fixes: 7b17c2f ("dm: Fix a race condition related to stopping and starting queues") Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent c00c513 commit a24e10a

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

drivers/md/dm-rq.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,6 @@ static void dm_old_stop_queue(struct request_queue *q)
9595

9696
static void dm_mq_stop_queue(struct request_queue *q)
9797
{
98-
if (blk_mq_queue_stopped(q))
99-
return;
100-
10198
blk_mq_quiesce_queue(q);
10299
}
103100

0 commit comments

Comments
 (0)