History

make simple_positive() public

Al Viro committed 11 years ago

Commit dc3f4191 parent 5d754ce14 files · +25 −60Browse files

Showing the changes to security (1 of 14 files). Show all

Unified · Split

security/inode.c+6−13
@@ -25,11 +25,6 @@ · 24 unmodified lines
2525 static struct vfsmount *mount;
2626 static int mount_count;
2727
28−static inline int positive(struct dentry *dentry)
29−{
30− return d_really_is_positive(dentry) && !d_unhashed(dentry);
31−}
32−
3328 static int fill_super(struct super_block *sb, void *data, int silent)
3429 {
3530 static struct tree_descr files[] = {{""}};
@@ -201,14 +196,12 @@ void securityfs_remove(struct dentry *dentry) · 165 unmodified lines
201196 return;
202197
203198 mutex_lock(&d_inode(parent)->i_mutex);
204− if (positive(dentry)) {
205− if (d_really_is_positive(dentry)) {
206− if (d_is_dir(dentry))
207− simple_rmdir(d_inode(parent), dentry);
208− else
209− simple_unlink(d_inode(parent), dentry);
210− dput(dentry);
211− }
199+ if (simple_positive(dentry)) {
200+ if (d_is_dir(dentry))
201+ simple_rmdir(d_inode(parent), dentry);
202+ else
203+ simple_unlink(d_inode(parent), dentry);
204+ dput(dentry);
212205 }
213206 mutex_unlock(&d_inode(parent)->i_mutex);
214207 simple_release_fs(&mount, &mount_count);