aboutsummaryrefslogtreecommitdiffstats
path: root/fs/minix/namei.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/minix/namei.c')
-rw-r--r--fs/minix/namei.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/minix/namei.c b/fs/minix/namei.c
index 6e6777f1b4b2..f60aed8db9c4 100644
--- a/fs/minix/namei.c
+++ b/fs/minix/namei.c
@@ -168,6 +168,8 @@ static int minix_rmdir(struct inode * dir, struct dentry *dentry)
168 struct inode * inode = dentry->d_inode; 168 struct inode * inode = dentry->d_inode;
169 int err = -ENOTEMPTY; 169 int err = -ENOTEMPTY;
170 170
171 dentry_unhash(dentry);
172
171 if (minix_empty_dir(inode)) { 173 if (minix_empty_dir(inode)) {
172 err = minix_unlink(dir, dentry); 174 err = minix_unlink(dir, dentry);
173 if (!err) { 175 if (!err) {
@@ -190,6 +192,9 @@ static int minix_rename(struct inode * old_dir, struct dentry *old_dentry,
190 struct minix_dir_entry * old_de; 192 struct minix_dir_entry * old_de;
191 int err = -ENOENT; 193 int err = -ENOENT;
192 194
195 if (new_inode && S_ISDIR(new_inode->i_mode))
196 dentry_unhash(new_dentry);
197
193 old_de = minix_find_entry(old_dentry, &old_page); 198 old_de = minix_find_entry(old_dentry, &old_page);
194 if (!old_de) 199 if (!old_de)
195 goto out; 200 goto out;