Skip to content

Commit

Permalink
drbd: ->d_parent is never NULL or negative
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed May 29, 2016
1 parent 2853908 commit 07a8e62
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
4 changes: 0 additions & 4 deletions drivers/block/drbd/drbd_debugfs.c
Expand Up @@ -430,9 +430,6 @@ static int drbd_single_open(struct file *file, int (*show)(struct seq_file *, vo
/* Are we still linked,
* or has debugfs_remove() already been called? */
parent = file->f_path.dentry->d_parent;
/* not sure if this can happen: */
if (!parent || d_really_is_negative(parent))
goto out;
/* serialize with d_delete() */
inode_lock(d_inode(parent));
/* Make sure the object is still alive */
Expand All @@ -445,7 +442,6 @@ static int drbd_single_open(struct file *file, int (*show)(struct seq_file *, vo
if (ret)
kref_put(kref, release);
}
out:
return ret;
}

Expand Down
4 changes: 0 additions & 4 deletions security/inode.c
Expand Up @@ -191,10 +191,6 @@ void securityfs_remove(struct dentry *dentry)
if (!dentry || IS_ERR(dentry))
return;

parent = dentry->d_parent;
if (!parent || d_really_is_negative(parent))
return;

inode_lock(d_inode(parent));
if (simple_positive(dentry)) {
if (d_is_dir(dentry))
Expand Down

0 comments on commit 07a8e62

Please sign in to comment.