From: Sage Weil Date: Tue, 24 May 2011 20:06:15 +0000 (-0700) Subject: btrfs: remove unnecessary dentry_unhash in rmdir/rename_dir X-Git-Tag: v3.0-rc1~141^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f64f58f85403a5a8a21f1fbbc7798e56580785cf;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git btrfs: remove unnecessary dentry_unhash in rmdir/rename_dir Btrfs has no problems with lingering references to unlinked directory inodes. CC: Chris Mason CC: linux-btrfs@vger.kernel.org Signed-off-by: Sage Weil Signed-off-by: Al Viro --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 3a33ae3..7cd8ab0 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -3062,8 +3062,6 @@ static int btrfs_rmdir(struct inode *dir, struct dentry *dentry) inode->i_ino == BTRFS_FIRST_FREE_OBJECTID) return -ENOTEMPTY; - dentry_unhash(dentry); - trans = __unlink_start_trans(dir, dentry); if (IS_ERR(trans)) return PTR_ERR(trans); @@ -6994,9 +6992,6 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry, u64 root_objectid; int ret; - if (new_inode && S_ISDIR(new_dentry->d_inode->i_mode)) - dentry_unhash(new_dentry); - if (new_dir->i_ino == BTRFS_EMPTY_SUBVOL_DIR_OBJECTID) return -EPERM;