]> Pileus Git - ~andy/linux/blobdiff - fs/hfs/dir.c
Merge branch 'gpio/next' of git://git.secretlab.ca/git/linux-2.6
[~andy/linux] / fs / hfs / dir.c
index 616cfe02b601d27f574f2622d17b017fa43b5a49..1cb70cdba2c1dbf61cb5bbe47f6bba47d5a70d6b 100644 (file)
@@ -286,6 +286,9 @@ static int hfs_rename(struct inode *old_dir, struct dentry *old_dentry,
 
        /* Unlink destination if it already exists */
        if (new_dentry->d_inode) {
+               if (S_ISDIR(new_dentry->d_inode->i_mode))
+                       dentry_unhash(new_dentry);
+
                res = hfs_remove(new_dir, new_dentry);
                if (res)
                        return res;