diff options
author | Sage Weil <sage@newdream.net> | 2011-05-29 21:20:59 -0700 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-05-30 01:48:27 -0400 |
commit | 3cebde2413ba42504cf2c10ec1d47582912435cd (patch) | |
tree | 296302cd2f065c125b1c932caa3bd836720c7efe /fs | |
parent | 55922c9d1b84b89cb946c777fddccb3247e7df2c (diff) |
vfs: shrink_dcache_parent before rmdir, dir rename
The dentry_unhash push-down series missed that shink_dcache_parent needs to
be called prior to rmdir or dir rename to clear DCACHE_REFERENCED and
allow efficient dentry reclaim.
Reported-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/namei.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/namei.c b/fs/namei.c index 1ab641f2e78..e2e4e8d032e 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -2579,6 +2579,7 @@ int vfs_rmdir(struct inode *dir, struct dentry *dentry) if (error) goto out; + shrink_dcache_parent(dentry); error = dir->i_op->rmdir(dir, dentry); if (error) goto out; @@ -2993,6 +2994,8 @@ static int vfs_rename_dir(struct inode *old_dir, struct dentry *old_dentry, if (d_mountpoint(old_dentry) || d_mountpoint(new_dentry)) goto out; + if (target) + shrink_dcache_parent(new_dentry); error = old_dir->i_op->rename(old_dir, old_dentry, new_dir, new_dentry); if (error) goto out; |