]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: Take tagset lock when updating hw queues
authorKeith Busch <keith.busch@intel.com>
Tue, 30 May 2017 18:39:11 +0000 (14:39 -0400)
committerJens Axboe <axboe@fb.com>
Tue, 30 May 2017 18:32:37 +0000 (12:32 -0600)
commitb63be3cd85707000701512bef94a56ac67efa80b
tree33a61d78cffb1db47474a60157d550c55e0ce6a8
parent5c7a2e73652c5144d940fb0cec78ed0a7c17273d
blk-mq: Take tagset lock when updating hw queues

The tagset lock needs to be held when iterating the tag_list, so a
lockdep assert was added when updating number of hardware queues. The
drivers calling this API, however, were unaware of the new requirement,
so are failing the assertion.

This patch takes the lock within the blk-mq function so the drivers do
not have to be modified in order to be safe.

Fixes: f38b9523e ("blk-mq: Make it safe to use RCU to iterate over blk_mq_tag_set.tag_list")
Reported-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
Reviewed-by: Bart Van Assche <Bart.VanAssche@sandisk.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq.c