aboutsummaryrefslogtreecommitdiff
path: root/fs/hpfs/namei.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/hpfs/namei.c')
-rw-r--r--fs/hpfs/namei.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/hpfs/namei.c b/fs/hpfs/namei.c
index b9fe158fd7b..d3db95f51a4 100644
--- a/fs/hpfs/namei.c
+++ b/fs/hpfs/namei.c
@@ -561,6 +561,10 @@ static int hpfs_rename(struct inode *old_dir, struct dentry *old_dentry,
struct buffer_head *bh;
struct fnode *fnode;
int err;
+
+ if (new_inode && S_ISDIR(new_inode->i_mode))
+ dentry_unhash(new_dentry);
+
if ((err = hpfs_chk_name(new_name, &new_len))) return err;
err = 0;
hpfs_adjust_length(old_name, &old_len);