]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
hpfs: remove unnecessary dentry_unhash on rmdir, dir rename
authorSage Weil <sage@newdream.net>
Fri, 27 May 2011 20:42:17 +0000 (13:42 -0700)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 28 May 2011 05:02:54 +0000 (01:02 -0400)
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>
fs/hpfs/namei.c

index ff0ce21c0867065f2efbcb30fbfee929ee6e4e09..acf95dab2aac97e38ae6a5d8209c70f107189ef9 100644 (file)
@@ -439,8 +439,6 @@ static int hpfs_rmdir(struct inode *dir, struct dentry *dentry)
        int err;
        int r;
 
-       dentry_unhash(dentry);
-
        hpfs_adjust_length(name, &len);
        hpfs_lock(dir->i_sb);
        err = -ENOENT;
@@ -535,9 +533,6 @@ static int hpfs_rename(struct inode *old_dir, struct dentry *old_dentry,
        struct fnode *fnode;
        int err;
 
-       if (new_inode && S_ISDIR(new_inode->i_mode))
-               dentry_unhash(new_dentry);
-
        if ((err = hpfs_chk_name(new_name, &new_len))) return err;
        err = 0;
        hpfs_adjust_length(old_name, &old_len);