--- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c @@ -315,6 +315,9 @@ static struct dentry *start_creating(con struct dentry *dentry; int error; + if (!debugfs_initialized()) + return ERR_PTR(-ENOENT); + pr_debug("creating file '%s'\n", name); if (IS_ERR(parent))