]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: don't create hctx debugfs dir until q->debugfs_dir is created
authorMing Lei <ming.lei@redhat.com>
Mon, 11 Jul 2022 09:08:08 +0000 (17:08 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 12 Jul 2022 12:52:27 +0000 (06:52 -0600)
commit06114075e2cd30f1f174e10f2f595463a8c1498d
tree75c5ca81268b791001468c28d9a9cea1bd5f4d8c
parentdf5e5e0c03f42ba0ed54043bcbf0f754b380c1b3
blk-mq: don't create hctx debugfs dir until q->debugfs_dir is created

blk_mq_debugfs_register_hctx() can be called by blk_mq_update_nr_hw_queues
when gendisk isn't added yet, such as nvme tcp.

Fixes the warning of 'debugfs: Directory 'hctx0' with parent '/' already present!'
which can be observed reliably when running blktests nvme/005.

Fixes: 08a5d58dd943 ("blk-mq: no need to check return value of debugfs_create functions")
Reported-by: Yi Zhang <yi.zhang@redhat.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Tested-by: Yi Zhang <yi.zhang@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220711090808.259682-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq-debugfs.c