]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dm rq: don't call blk_mq_queue_stopped() in dm_stop_queue()
authorMing Lei <ming.lei@redhat.com>
Fri, 19 Jun 2020 08:42:14 +0000 (16:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Aug 2020 11:07:35 +0000 (13:07 +0200)
commit4e60d717d60ce1f4007eea9a8f8f68cec6bab24d
tree3d47fa86d14532201f6781552aa84c5b86ff1192
parent5d010d2fab4adc3ebc9abf9c582345dacbaf052f
dm rq: don't call blk_mq_queue_stopped() in dm_stop_queue()

[ Upstream commit e766668c6cd49d741cfb49eaeb38998ba34d27bc ]

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: 7b17c2f7292ba ("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>
drivers/md/dm-rq.c