mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
drbd: ->d_parent is never NULL or negative
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -430,9 +430,6 @@ static int drbd_single_open(struct file *file, int (*show)(struct seq_file *, vo
|
|||||||
/* Are we still linked,
|
/* Are we still linked,
|
||||||
* or has debugfs_remove() already been called? */
|
* or has debugfs_remove() already been called? */
|
||||||
parent = file->f_path.dentry->d_parent;
|
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() */
|
/* serialize with d_delete() */
|
||||||
inode_lock(d_inode(parent));
|
inode_lock(d_inode(parent));
|
||||||
/* Make sure the object is still alive */
|
/* Make sure the object is still alive */
|
||||||
@@ -445,7 +442,6 @@ static int drbd_single_open(struct file *file, int (*show)(struct seq_file *, vo
|
|||||||
if (ret)
|
if (ret)
|
||||||
kref_put(kref, release);
|
kref_put(kref, release);
|
||||||
}
|
}
|
||||||
out:
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -191,10 +191,6 @@ void securityfs_remove(struct dentry *dentry)
|
|||||||
if (!dentry || IS_ERR(dentry))
|
if (!dentry || IS_ERR(dentry))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
parent = dentry->d_parent;
|
|
||||||
if (!parent || d_really_is_negative(parent))
|
|
||||||
return;
|
|
||||||
|
|
||||||
inode_lock(d_inode(parent));
|
inode_lock(d_inode(parent));
|
||||||
if (simple_positive(dentry)) {
|
if (simple_positive(dentry)) {
|
||||||
if (d_is_dir(dentry))
|
if (d_is_dir(dentry))
|
||||||
|
Reference in New Issue
Block a user