Skip to content

Commit

Permalink
btrfs: remove unnecessary dentry_unhash in rmdir/rename_dir
Browse files Browse the repository at this point in the history
Btrfs has no problems with lingering references to unlinked directory
inodes.

CC: Chris Mason <chris.mason@oracle.com>
CC: linux-btrfs@vger.kernel.org
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Sage Weil authored and Al Viro committed May 26, 2011
1 parent 051e8f0 commit f64f58f
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit f64f58f

Please sign in to comment.