aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ecryptfs')
-rw-r--r--fs/ecryptfs/inode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index c88612f0c1eb..227b409b8406 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -573,6 +573,9 @@ ecryptfs_rename(struct inode *old_dir, struct dentry *old_dentry,
573 struct dentry *lower_new_dir_dentry; 573 struct dentry *lower_new_dir_dentry;
574 struct dentry *trap = NULL; 574 struct dentry *trap = NULL;
575 575
576 if (new_dentry->d_inode && S_ISDIR(new_dentry->d_inode->i_mode))
577 dentry_unhash(new_dentry);
578
576 lower_old_dentry = ecryptfs_dentry_to_lower(old_dentry); 579 lower_old_dentry = ecryptfs_dentry_to_lower(old_dentry);
577 lower_new_dentry = ecryptfs_dentry_to_lower(new_dentry); 580 lower_new_dentry = ecryptfs_dentry_to_lower(new_dentry);
578 dget(lower_old_dentry); 581 dget(lower_old_dentry);