Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[linux-2.6-block.git] / fs / debugfs / inode.c
index 61dfe45fdb6837dab7f5359544385810819b5d9f..c1e7ffb0dab658ecd21c449bf36467b14e0b75d6 100644 (file)
@@ -254,6 +254,9 @@ static struct dentry *start_creating(const char *name, struct dentry *parent)
 
        pr_debug("debugfs: creating file '%s'\n",name);
 
+       if (IS_ERR(parent))
+               return parent;
+
        error = simple_pin_fs(&debug_fs_type, &debugfs_mount,
                              &debugfs_mount_count);
        if (error)