From: Sage Weil Date: Fri, 27 May 2011 20:42:17 +0000 (-0700) Subject: hpfs: remove unnecessary dentry_unhash on rmdir, dir rename X-Git-Tag: 2.1b_release~3836^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=45adfef7d023004ff95bf63b5f2f0e2d88afac3f;p=platform%2Fkernel%2Fkernel-mfld-blackbay.git 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 Signed-off-by: Sage Weil Signed-off-by: Al Viro --- diff --git a/fs/hpfs/namei.c b/fs/hpfs/namei.c index ff0ce21..acf95da 100644 --- a/fs/hpfs/namei.c +++ b/fs/hpfs/namei.c @@ -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);