]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/ecryptfs/inode.c
vfs: push dentry_unhash on rename_dir into file systems
[mirror_ubuntu-artful-kernel.git] / fs / ecryptfs / inode.c
index c88612f0c1eb1304ce494debc5d3b7b7243f0fd6..227b409b8406b4bf4b70f4209cc49b8585d1bf4f 100644 (file)
@@ -573,6 +573,9 @@ ecryptfs_rename(struct inode *old_dir, struct dentry *old_dentry,
        struct dentry *lower_new_dir_dentry;
        struct dentry *trap = NULL;
 
+       if (new_dentry->d_inode && S_ISDIR(new_dentry->d_inode->i_mode))
+               dentry_unhash(new_dentry);
+
        lower_old_dentry = ecryptfs_dentry_to_lower(old_dentry);
        lower_new_dentry = ecryptfs_dentry_to_lower(new_dentry);
        dget(lower_old_dentry);