Commit 93a6925e authored by Chris Mason's avatar Chris Mason Committed by David Woodhouse

Btrfs: Fix extra link count dec in rename

Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 3de3f774
......@@ -2214,13 +2214,6 @@ static int btrfs_rename(struct inode * old_dir, struct dentry *old_dentry,
ret = btrfs_unlink_trans(trans, root, new_dir, new_dentry);
if (ret)
goto out_fail;
if (S_ISDIR(new_inode->i_mode))
clear_nlink(new_inode);
else
drop_nlink(new_inode);
ret = btrfs_update_inode(trans, root, new_inode);
if (ret)
goto out_fail;
}
ret = btrfs_add_link(trans, new_dentry, old_inode);
if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment