Skip to content

Commit 27cd1bf

Browse files
author
Al Viro
committed
securityfs: don't pin dentries twice, once is enough...
incidentally, securityfs_recursive_remove() is broken without that - it leaks dentries, since simple_recursive_removal() does not expect anything of that sort. It could be worked around by dput() in remove_one() callback, but it's easier to just drop that double-get stuff. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 19272b3 commit 27cd1bf

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

security/inode.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ static struct dentry *securityfs_create_dentry(const char *name, umode_t mode,
159159
inode->i_fop = fops;
160160
}
161161
d_instantiate(dentry, inode);
162-
dget(dentry);
163162
inode_unlock(dir);
164163
return dentry;
165164

@@ -306,7 +305,6 @@ void securityfs_remove(struct dentry *dentry)
306305
simple_rmdir(dir, dentry);
307306
else
308307
simple_unlink(dir, dentry);
309-
dput(dentry);
310308
}
311309
inode_unlock(dir);
312310
simple_release_fs(&mount, &mount_count);

0 commit comments

Comments
 (0)