Showing the changes to security (1 of 14 files). Show all
Unified · Split
| @@ -25,11 +25,6 @@ · 24 unmodified lines | ||
| 25 | 25 | static struct vfsmount *mount; |
| 26 | 26 | static int mount_count; |
| 27 | 27 | |
| 28 | −static inline int positive(struct dentry *dentry) | |
| 29 | −{ | |
| 30 | − return d_really_is_positive(dentry) && !d_unhashed(dentry); | |
| 31 | −} | |
| 32 | − | |
| 33 | 28 | static int fill_super(struct super_block *sb, void *data, int silent) |
| 34 | 29 | { |
| 35 | 30 | static struct tree_descr files[] = {{""}}; |
| @@ -201,14 +196,12 @@ void securityfs_remove(struct dentry *dentry) · 165 unmodified lines | ||
| 201 | 196 | return; |
| 202 | 197 | |
| 203 | 198 | 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); | |
| 212 | 205 | } |
| 213 | 206 | mutex_unlock(&d_inode(parent)->i_mutex); |
| 214 | 207 | simple_release_fs(&mount, &mount_count); |