btrfs: qgroup: Drop quota_root parameter from del_qgroup_relation_item
It can be fetched from the transaction handle. Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
711169c40f
commit
99d7f09ac0
|
@ -554,11 +554,11 @@ static int add_qgroup_relation_item(struct btrfs_trans_handle *trans, u64 src,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int del_qgroup_relation_item(struct btrfs_trans_handle *trans,
|
static int del_qgroup_relation_item(struct btrfs_trans_handle *trans, u64 src,
|
||||||
struct btrfs_root *quota_root,
|
u64 dst)
|
||||||
u64 src, u64 dst)
|
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
struct btrfs_root *quota_root = trans->fs_info->quota_root;
|
||||||
struct btrfs_path *path;
|
struct btrfs_path *path;
|
||||||
struct btrfs_key key;
|
struct btrfs_key key;
|
||||||
|
|
||||||
|
@ -1280,7 +1280,7 @@ int btrfs_add_qgroup_relation(struct btrfs_trans_handle *trans,
|
||||||
|
|
||||||
ret = add_qgroup_relation_item(trans, dst, src);
|
ret = add_qgroup_relation_item(trans, dst, src);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
del_qgroup_relation_item(trans, quota_root, src, dst);
|
del_qgroup_relation_item(trans, src, dst);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1334,8 +1334,8 @@ static int __del_qgroup_relation(struct btrfs_trans_handle *trans,
|
||||||
ret = -ENOENT;
|
ret = -ENOENT;
|
||||||
goto out;
|
goto out;
|
||||||
exist:
|
exist:
|
||||||
ret = del_qgroup_relation_item(trans, quota_root, src, dst);
|
ret = del_qgroup_relation_item(trans, src, dst);
|
||||||
err = del_qgroup_relation_item(trans, quota_root, dst, src);
|
err = del_qgroup_relation_item(trans, dst, src);
|
||||||
if (err && !ret)
|
if (err && !ret)
|
||||||
ret = err;
|
ret = err;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue