Skip to content

Commit 45adfef

Browse files
liewegasAl Viro
authored andcommitted
hpfs: remove unnecessary dentry_unhash on rmdir, dir rename
Hpfs has no problems with references to unlinked directories. We leave one dentry_unhash call in place, in hpfs_unlink's strange path where it tries to truncate a file because the disk is full. I'm not sure what the full story is there. CC: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> Signed-off-by: Sage Weil <sage@newdream.net> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent b80d2c2 commit 45adfef

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

‎fs/hpfs/namei.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,6 @@ static int hpfs_rmdir(struct inode *dir, struct dentry *dentry)
439439
int err;
440440
int r;
441441

442-
dentry_unhash(dentry);
443-
444442
hpfs_adjust_length(name, &len);
445443
hpfs_lock(dir->i_sb);
446444
err = -ENOENT;
@@ -535,9 +533,6 @@ static int hpfs_rename(struct inode *old_dir, struct dentry *old_dentry,
535533
struct fnode *fnode;
536534
int err;
537535

538-
if (new_inode && S_ISDIR(new_inode->i_mode))
539-
dentry_unhash(new_dentry);
540-
541536
if ((err = hpfs_chk_name(new_name, &new_len))) return err;
542537
err = 0;
543538
hpfs_adjust_length(old_name, &old_len);

0 commit comments

Comments
 (0)