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
25static struct vfsmount *mount;25static struct vfsmount *mount;
26static int mount_count;26static int mount_count;
27 27
28static inline int positive(struct dentry *dentry)
29{
30 return d_really_is_positive(dentry) && !d_unhashed(dentry);
31}
32
33static int fill_super(struct super_block *sb, void *data, int silent)28static int fill_super(struct super_block *sb, void *data, int silent)
34{29{
35 static struct tree_descr files[] = {{""}};30 static struct tree_descr files[] = {{""}};
@@ -201,14 +196,12 @@ void securityfs_remove(struct dentry *dentry) · 165 unmodified lines
201 return;196 return;
202 197
203 mutex_lock(&d_inode(parent)->i_mutex);198 mutex_lock(&d_inode(parent)->i_mutex);
204 if (positive(dentry)) {199 if (simple_positive(dentry)) {
205 if (d_really_is_positive(dentry)) {200 if (d_is_dir(dentry))
206 if (d_is_dir(dentry))201 simple_rmdir(d_inode(parent), dentry);
207 simple_rmdir(d_inode(parent), dentry);202 else
208 else203 simple_unlink(d_inode(parent), dentry);
209 simple_unlink(d_inode(parent), dentry);204 dput(dentry);
210 dput(dentry);
211 }
212 }205 }
213 mutex_unlock(&d_inode(parent)->i_mutex);206 mutex_unlock(&d_inode(parent)->i_mutex);
214 simple_release_fs(&mount, &mount_count);207 simple_release_fs(&mount, &mount_count);