From 07a8e62fde3c17e3d25e397cb5028176756fa316 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 29 May 2016 14:52:22 -0400 Subject: drbd: ->d_parent is never NULL or negative Signed-off-by: Al Viro --- security/inode.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'security') diff --git a/security/inode.c b/security/inode.c index 28414b0207ce..526f82269cb0 100644 --- a/security/inode.c +++ b/security/inode.c @@ -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)) -- cgit v1.2.3-59-g8ed1b From 4093d306a91f240f613f8b2c7c6843f4414adf8c Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 29 May 2016 14:54:04 -0400 Subject: securityfs: ->d_parent is never NULL or negative Signed-off-by: Al Viro --- security/inode.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'security') diff --git a/security/inode.c b/security/inode.c index 526f82269cb0..e3df905ab5b1 100644 --- a/security/inode.c +++ b/security/inode.c @@ -186,20 +186,21 @@ EXPORT_SYMBOL_GPL(securityfs_create_dir); */ void securityfs_remove(struct dentry *dentry) { - struct dentry *parent; + struct inode *dir; if (!dentry || IS_ERR(dentry)) return; - inode_lock(d_inode(parent)); + dir = d_inode(dentry->d_parent); + inode_lock(dir); if (simple_positive(dentry)) { if (d_is_dir(dentry)) - simple_rmdir(d_inode(parent), dentry); + simple_rmdir(dir, dentry); else - simple_unlink(d_inode(parent), dentry); + simple_unlink(dir, dentry); dput(dentry); } - inode_unlock(d_inode(parent)); + inode_unlock(dir); simple_release_fs(&mount, &mount_count); } EXPORT_SYMBOL_GPL(securityfs_remove); -- cgit v1.2.3-59-g8ed1b