Showing the changes to security (1 of 14 files). Show all
Unified · Split
| @@ -25,11 +25,6 @@ · 24 unmodified lines | |||
| 25 | static struct vfsmount *mount; | 25 | static struct vfsmount *mount; |
| 26 | static int mount_count; | 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 | static int fill_super(struct super_block *sb, void *data, int silent) | 28 | static 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 | else | 203 | 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); |