diff options
| -rw-r--r-- | block/blk-mq-debugfs.c | 7 |
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 | ||
