summaryrefslogtreecommitdiffstats
path: root/fs/exofs/namei.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/exofs/namei.c')
-rw-r--r--fs/exofs/namei.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/exofs/namei.c b/fs/exofs/namei.c
index 0697175..de252e5 100644
--- a/fs/exofs/namei.c
+++ b/fs/exofs/namei.c
@@ -251,6 +251,9 @@ static int exofs_rename(struct inode *old_dir, struct dentry *old_dentry,
struct exofs_dir_entry *old_de;
int err = -ENOENT;
+ if (new_inode && S_ISDIR(new_inode->i_mode))
+ dentry_unhash(new_dentry);
+
old_de = exofs_find_entry(old_dir, old_dentry, &old_page);
if (!old_de)
goto out;
OpenPOWER on IntegriCloud