Skip to content

Commit 87161fa

Browse files
liewegasAl Viro
authored andcommitted
ufs: remove unnecessary dentry_unhash from rmdir, dir rename
ufs does not have problems with references to unlinked directories. CC: Evgeniy Dushistov <dushistov@mail.ru> Signed-off-by: Sage Weil <sage@newdream.net> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 0e54ec1 commit 87161fa

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

‎fs/ufs/namei.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,6 @@ static int ufs_rmdir (struct inode * dir, struct dentry *dentry)
258258
struct inode * inode = dentry->d_inode;
259259
int err= -ENOTEMPTY;
260260

261-
dentry_unhash(dentry);
262-
263261
lock_ufs(dir->i_sb);
264262
if (ufs_empty_dir (inode)) {
265263
err = ufs_unlink(dir, dentry);
@@ -284,9 +282,6 @@ static int ufs_rename(struct inode *old_dir, struct dentry *old_dentry,
284282
struct ufs_dir_entry *old_de;
285283
int err = -ENOENT;
286284

287-
if (new_inode && S_ISDIR(new_inode->i_mode))
288-
dentry_unhash(new_dentry);
289-
290285
old_de = ufs_find_entry(old_dir, &old_dentry->d_name, &old_page);
291286
if (!old_de)
292287
goto out;

0 commit comments

Comments
 (0)