aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-06 11:50:32 -0400
committerJens Axboe <axboe@kernel.dk>2019-07-06 12:07:38 -0400
commit7e41c3c9b6ceb2da52ba9d2b328d1851f269a48e (patch)
tree1d72ad4ad3a48ea2d054b222f02d02e57bf0f1b9
parente6feaf215f07dd98d03ee783c9dd4c7f7e55b74d (diff)
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>
-rw-r--r--block/blk-mq-debugfs.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
index 2489ddbb21db..3afe327f816f 100644
--- a/block/blk-mq-debugfs.c
+++ b/block/blk-mq-debugfs.c
@@ -934,6 +934,13 @@ void blk_mq_debugfs_register_sched(struct request_queue *q)
934{ 934{
935 struct elevator_type *e = q->elevator->type; 935 struct elevator_type *e = q->elevator->type;
936 936
937 /*
938 * If the parent directory has not been created yet, return, we will be
939 * called again later on and the directory/files will be created then.
940 */
941 if (!q->debugfs_dir)
942 return;
943
937 if (!e->queue_debugfs_attrs) 944 if (!e->queue_debugfs_attrs)
938 return; 945 return;
939 946