]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/nfs/dir.c
vfs: push dentry_unhash on rename_dir into file systems
[mirror_ubuntu-artful-kernel.git] / fs / nfs / dir.c
index 48483b562361526ffd5fb1f0664e3bd65355dcee..87daf79821868852ec3993d29b3266b1996a3705 100644 (file)
@@ -1959,6 +1959,9 @@ static int nfs_rename(struct inode *old_dir, struct dentry *old_dentry,
                 new_dentry->d_parent->d_name.name, new_dentry->d_name.name,
                 new_dentry->d_count);
 
+       if (new_inode && S_ISDIR(new_inode->i_mode))
+               dentry_unhash(new_dentry);
+
        /*
         * For non-directories, check whether the target is busy and if so,
         * make a copy of the dentry and then do a silly-rename. If the