aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysv/namei.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/sysv/namei.c')
-rw-r--r--fs/sysv/namei.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/sysv/namei.c b/fs/sysv/namei.c
index fac64ac3186..e2cc6756f3b 100644
--- a/fs/sysv/namei.c
+++ b/fs/sysv/namei.c
@@ -224,6 +224,9 @@ static int sysv_rename(struct inode * old_dir, struct dentry * old_dentry,
224 struct sysv_dir_entry * old_de; 224 struct sysv_dir_entry * old_de;
225 int err = -ENOENT; 225 int err = -ENOENT;
226 226
227 if (new_inode && S_ISDIR(new_inode->i_mode))
228 dentry_unhash(new_dentry);
229
227 old_de = sysv_find_entry(old_dentry, &old_page); 230 old_de = sysv_find_entry(old_dentry, &old_page);
228 if (!old_de) 231 if (!old_de)
229 goto out; 232 goto out;