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>
            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);
        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;