]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/ocfs2/namei.c
vfs: push dentry_unhash on rename_dir into file systems
[mirror_ubuntu-artful-kernel.git] / fs / ocfs2 / namei.c
index b017ebbaf3fab87e2709fbe74adb668eff12944f..f3582a6a6dac87595d0a3ccad45f0ed4d5c3b9a2 100644 (file)
@@ -1066,6 +1066,9 @@ static int ocfs2_rename(struct inode *old_dir,
        struct ocfs2_dir_lookup_result orphan_insert = { NULL, };
        struct ocfs2_dir_lookup_result target_insert = { NULL, };
 
+       if (new_inode && S_ISDIR(new_inode->i_mode))
+               dentry_unhash(new_dentry);
+
        /* At some point it might be nice to break this function up a
         * bit. */