提交 93a6925e 编写于 作者: C Chris Mason 提交者: David Woodhouse

Btrfs: Fix extra link count dec in rename

Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册