]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: Register <dev>/queue/mq after having registered <dev>/queue
authorBart Van Assche <bart.vanassche@sandisk.com>
Wed, 26 Apr 2017 20:47:48 +0000 (13:47 -0700)
committerJens Axboe <axboe@fb.com>
Wed, 26 Apr 2017 21:09:04 +0000 (15:09 -0600)
commiteead7938a7e6ee6934e9f1f4b47bd88da977dc30
tree815eee282e7f3204d4c723e5b190ffc026f0fb02
parent2b9cc36f91a33b2ebd05d7a16d2cc6df3f7fb290
blk-mq: Register <dev>/queue/mq after having registered <dev>/queue

A later patch in this series will modify blk_mq_debugfs_register()
such that it uses q->kobj.parent to determine the name of a
request queue. Hence make sure that that pointer is initialized
before blk_mq_debugfs_register() is called. To avoid lock inversion,
protect sysfs / debugfs registration with the queue sysfs_lock
instead of the global mutex all_q_mutex.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq-sysfs.c
block/blk-mq.h
block/blk-sysfs.c