vfs: push dentry_unhash on rename_dir into file systems
[linux-3.10.git] / fs / minix / namei.c
index 091626f..f60aed8 100644 (file)
@@ -192,6 +192,9 @@ static int minix_rename(struct inode * old_dir, struct dentry *old_dentry,
        struct minix_dir_entry * old_de;
        int err = -ENOENT;
 
+       if (new_inode && S_ISDIR(new_inode->i_mode))
+               dentry_unhash(new_dentry);
+
        old_de = minix_find_entry(old_dentry, &old_page);
        if (!old_de)
                goto out;