debugfs: ->d_parent is never NULL or negative
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 29 May 2016 19:20:30 +0000 (15:20 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 29 May 2016 20:22:08 +0000 (16:22 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/debugfs/inode.c

index 4bc1f68..72361ba 100644 (file)
@@ -621,9 +621,6 @@ void debugfs_remove(struct dentry *dentry)
                return;
 
        parent = dentry->d_parent;
-       if (!parent || d_really_is_negative(parent))
-               return;
-
        inode_lock(d_inode(parent));
        ret = __debugfs_remove(dentry, parent);
        inode_unlock(d_inode(parent));
@@ -654,10 +651,6 @@ void debugfs_remove_recursive(struct dentry *dentry)
        if (IS_ERR_OR_NULL(dentry))
                return;
 
-       parent = dentry->d_parent;
-       if (!parent || d_really_is_negative(parent))
-               return;
-
        parent = dentry;
  down:
        inode_lock(d_inode(parent));