blk-mq: fix up placement of debugfs directory of queue files
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Jul 2019 15:50:32 +0000 (17:50 +0200)
committerJens Axboe <axboe@kernel.dk>
Sat, 6 Jul 2019 16:07:38 +0000 (10:07 -0600)
commit7e41c3c9b6ceb2da52ba9d2b328d1851f269a48e
tree1d72ad4ad3a48ea2d054b222f02d02e57bf0f1b9
parente6feaf215f07dd98d03ee783c9dd4c7f7e55b74d
blk-mq: fix up placement of debugfs directory of queue files

When the blk-mq debugfs file creation logic was "cleaned up" it was
cleaned up too much, causing the queue file to not be created in the
correct location.  Turns out the check for the directory being present
is needed as if that has not happened yet, the files should not be
created, and the function will be called later on in the initialization
code so that the files can be created in the correct location.

Fixes: 6cfc0081b046 ("blk-mq: no need to check return value of debugfs_create functions")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linux-block@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq-debugfs.c