]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/reiserfs/namei.c
vfs: push dentry_unhash on rename_dir into file systems
[mirror_ubuntu-artful-kernel.git] / fs / reiserfs / namei.c
index 43e94f0f60baf4dfb74d4c0cceb7e8becbdbc7f4..76c8164d56513ace39925dd14ca1fdf64fe574f2 100644 (file)
@@ -1227,6 +1227,9 @@ static int reiserfs_rename(struct inode *old_dir, struct dentry *old_dentry,
        unsigned long savelink = 1;
        struct timespec ctime;
 
+       if (new_dentry->d_inode && S_ISDIR(new_dentry->d_inode->i_mode))
+               dentry_unhash(new_dentry);
+
        /* three balancings: (1) old name removal, (2) new name insertion
           and (3) maybe "save" link insertion
           stat data updates: (1) old directory,