diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-05-18 10:10:34 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-06-23 18:02:01 -0400 |
commit | dc3f4198eac14e52a98dfc79cd84b45e280f59cd (patch) | |
tree | 1fa6e8ec571132471e903a6a1d34accacfa9ad33 /fs/debugfs | |
parent | 5d754ced150e392c7b5dbf73ed2feddb60cd579a (diff) | |
download | linux-dc3f4198eac14e52a98dfc79cd84b45e280f59cd.tar.gz linux-dc3f4198eac14e52a98dfc79cd84b45e280f59cd.tar.bz2 linux-dc3f4198eac14e52a98dfc79cd84b45e280f59cd.zip |
make simple_positive() public
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/debugfs')
-rw-r--r-- | fs/debugfs/inode.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index 7eaec88ea970..ef86ad6bdc3e 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c @@ -44,11 +44,6 @@ static struct inode *debugfs_get_inode(struct super_block *sb) return inode; } -static inline int debugfs_positive(struct dentry *dentry) -{ - return d_really_is_positive(dentry) && !d_unhashed(dentry); -} - struct debugfs_mount_opts { kuid_t uid; kgid_t gid; @@ -522,7 +517,7 @@ static int __debugfs_remove(struct dentry *dentry, struct dentry *parent) { int ret = 0; - if (debugfs_positive(dentry)) { + if (simple_positive(dentry)) { dget(dentry); if (d_is_dir(dentry)) ret = simple_rmdir(d_inode(parent), dentry); @@ -602,7 +597,7 @@ void debugfs_remove_recursive(struct dentry *dentry) */ spin_lock(&parent->d_lock); list_for_each_entry(child, &parent->d_subdirs, d_child) { - if (!debugfs_positive(child)) + if (!simple_positive(child)) continue; /* perhaps simple_empty(child) makes more sense */ @@ -623,7 +618,7 @@ void debugfs_remove_recursive(struct dentry *dentry) * from d_subdirs. When releasing the parent->d_lock we can * no longer trust that the next pointer is valid. * Restart the loop. We'll skip this one with the - * debugfs_positive() check. + * simple_positive() check. */ goto loop; } |