diff options
| -rw-r--r-- | fs/autofs4/root.c | 2 | ||||
| -rw-r--r-- | fs/namei.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c index 87d95a8cddbc..f55ae23b137e 100644 --- a/fs/autofs4/root.c +++ b/fs/autofs4/root.c | |||
| @@ -583,8 +583,6 @@ static int autofs4_dir_unlink(struct inode *dir, struct dentry *dentry) | |||
| 583 | if (!autofs4_oz_mode(sbi) && !capable(CAP_SYS_ADMIN)) | 583 | if (!autofs4_oz_mode(sbi) && !capable(CAP_SYS_ADMIN)) |
| 584 | return -EACCES; | 584 | return -EACCES; |
| 585 | 585 | ||
| 586 | dentry_unhash(dentry); | ||
| 587 | |||
| 588 | if (atomic_dec_and_test(&ino->count)) { | 586 | if (atomic_dec_and_test(&ino->count)) { |
| 589 | p_ino = autofs4_dentry_ino(dentry->d_parent); | 587 | p_ino = autofs4_dentry_ino(dentry->d_parent); |
| 590 | if (p_ino && dentry->d_parent != dentry) | 588 | if (p_ino && dentry->d_parent != dentry) |
diff --git a/fs/namei.c b/fs/namei.c index 1ab641f2e78e..e2e4e8d032ee 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
| @@ -2579,6 +2579,7 @@ int vfs_rmdir(struct inode *dir, struct dentry *dentry) | |||
| 2579 | if (error) | 2579 | if (error) |
| 2580 | goto out; | 2580 | goto out; |
| 2581 | 2581 | ||
| 2582 | shrink_dcache_parent(dentry); | ||
| 2582 | error = dir->i_op->rmdir(dir, dentry); | 2583 | error = dir->i_op->rmdir(dir, dentry); |
| 2583 | if (error) | 2584 | if (error) |
| 2584 | goto out; | 2585 | goto out; |
| @@ -2993,6 +2994,8 @@ static int vfs_rename_dir(struct inode *old_dir, struct dentry *old_dentry, | |||
| 2993 | if (d_mountpoint(old_dentry) || d_mountpoint(new_dentry)) | 2994 | if (d_mountpoint(old_dentry) || d_mountpoint(new_dentry)) |
| 2994 | goto out; | 2995 | goto out; |
| 2995 | 2996 | ||
| 2997 | if (target) | ||
| 2998 | shrink_dcache_parent(new_dentry); | ||
| 2996 | error = old_dir->i_op->rename(old_dir, old_dentry, new_dir, new_dentry); | 2999 | error = old_dir->i_op->rename(old_dir, old_dentry, new_dir, new_dentry); |
| 2997 | if (error) | 3000 | if (error) |
| 2998 | goto out; | 3001 | goto out; |
