VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Saravanan D <saravanand@fb.com> 2021-04-07 10:59:58 -0700 committer: Jens Axboe <axboe@kernel.dk> 2021-04-16 15:17:01 -0600 commit: 1e91e28e374d0b0b912154c192716374609360d9 parent: 7687b38ae470f01749e420079c36cccb24b8619a
Commit Summary:
blk-mq: Fix spurious debugfs directory creation during initialization
Diffstat:
1 file changed, 8 insertions, 0 deletions
diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
index 9ebb344e2585..8ea96d83d599 100644
--- a/block/blk-mq-debugfs.c
+++ b/block/blk-mq-debugfs.c
@@ -973,6 +973,14 @@ void blk_mq_debugfs_register_sched_hctx(struct request_queue *q,
 {
 	struct elevator_type *e = q->elevator->type;
 
+	/*
+	 * If the parent debugfs directory has not been created yet, return;
+	 * We will be called again later on with appropriate parent debugfs
+	 * directory from blk_register_queue()
+	 */
+	if (!hctx->debugfs_dir)
+		return;
+
 	if (!e->hctx_debugfs_attrs)
 		return;