]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: Allow blocking queue tag iter callbacks
authorKeith Busch <keith.busch@intel.com>
Tue, 25 Sep 2018 16:36:20 +0000 (10:36 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 26 Sep 2018 02:17:59 +0000 (20:17 -0600)
commit6d8a59c4a3a61617be6414ccd0cf6a5452254ae6
treef25bd9aa92fc0042974192d81b705253ddd8c597
parent76a0daece322be6096f738e6235d95ca827132d3
blk-mq: Allow blocking queue tag iter callbacks

A recent commit runs tag iterator callbacks under the rcu read lock,
but existing callbacks do not satisfy the non-blocking requirement.
The commit intended to prevent an iterator from accessing a queue that's
being modified. This patch fixes the original issue by taking a queue
reference instead of reading it, which allows callbacks to make blocking
calls.

Fixes: 5ef4dfb8e31c7 ("blk-mq: sync the update nr_hw_queues with blk_mq_queue_tag_busy_iter")
Acked-by: Jianchao Wang <jianchao.w.wang@oracle.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq-tag.c