summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-05-18 17:10:34 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2015-06-24 01:02:01 +0300
commitdc3f4198eac14e52a98dfc79cd84b45e280f59cd (patch)
tree1fa6e8ec571132471e903a6a1d34accacfa9ad33 /security
parent5d754ced150e392c7b5dbf73ed2feddb60cd579a (diff)
downloadlinux-dc3f4198eac14e52a98dfc79cd84b45e280f59cd.tar.xz
make simple_positive() public
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'security')
-rw-r--r--security/inode.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/security/inode.c b/security/inode.c
index 91503b79c5f8..6df0d8dae1e0 100644
--- a/security/inode.c
+++ b/security/inode.c
@@ -25,11 +25,6 @@
static struct vfsmount *mount;
static int mount_count;
-static inline int positive(struct dentry *dentry)
-{
- return d_really_is_positive(dentry) && !d_unhashed(dentry);
-}
-
static int fill_super(struct super_block *sb, void *data, int silent)
{
static struct tree_descr files[] = {{""}};
@@ -201,14 +196,12 @@ void securityfs_remove(struct dentry *dentry)
return;
mutex_lock(&d_inode(parent)->i_mutex);
- if (positive(dentry)) {
- if (d_really_is_positive(dentry)) {
- if (d_is_dir(dentry))
- simple_rmdir(d_inode(parent), dentry);
- else
- simple_unlink(d_inode(parent), dentry);
- dput(dentry);
- }
+ if (simple_positive(dentry)) {
+ if (d_is_dir(dentry))
+ simple_rmdir(d_inode(parent), dentry);
+ else
+ simple_unlink(d_inode(parent), dentry);
+ dput(dentry);
}
mutex_unlock(&d_inode(parent)->i_mutex);
simple_release_fs(&mount, &mount_count);