diff options
Diffstat (limited to 'fs/exofs/namei.c')
-rw-r--r-- | fs/exofs/namei.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/exofs/namei.c b/fs/exofs/namei.c index 0697175d1a38..de252e5acf05 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, | |||
251 | struct exofs_dir_entry *old_de; | 251 | struct exofs_dir_entry *old_de; |
252 | int err = -ENOENT; | 252 | int err = -ENOENT; |
253 | 253 | ||
254 | if (new_inode && S_ISDIR(new_inode->i_mode)) | ||
255 | dentry_unhash(new_dentry); | ||
256 | |||
254 | old_de = exofs_find_entry(old_dir, old_dentry, &old_page); | 257 | old_de = exofs_find_entry(old_dir, old_dentry, &old_page); |
255 | if (!old_de) | 258 | if (!old_de) |
256 | goto out; | 259 | goto out; |