btrfs: qgroup: Drop root parameter from update_qgroup_limit_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
69104618f4
commit
ac8a866af1
1 changed files with 5 additions and 5 deletions
|
@ -700,9 +700,9 @@ out:
|
||||||
}
|
}
|
||||||
|
|
||||||
static int update_qgroup_limit_item(struct btrfs_trans_handle *trans,
|
static int update_qgroup_limit_item(struct btrfs_trans_handle *trans,
|
||||||
struct btrfs_root *root,
|
|
||||||
struct btrfs_qgroup *qgroup)
|
struct btrfs_qgroup *qgroup)
|
||||||
{
|
{
|
||||||
|
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;
|
||||||
struct extent_buffer *l;
|
struct extent_buffer *l;
|
||||||
|
@ -718,7 +718,7 @@ static int update_qgroup_limit_item(struct btrfs_trans_handle *trans,
|
||||||
if (!path)
|
if (!path)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
ret = btrfs_search_slot(trans, root, &key, path, 0, 1);
|
ret = btrfs_search_slot(trans, quota_root, &key, path, 0, 1);
|
||||||
if (ret > 0)
|
if (ret > 0)
|
||||||
ret = -ENOENT;
|
ret = -ENOENT;
|
||||||
|
|
||||||
|
@ -1509,7 +1509,7 @@ int btrfs_limit_qgroup(struct btrfs_trans_handle *trans,
|
||||||
|
|
||||||
spin_unlock(&fs_info->qgroup_lock);
|
spin_unlock(&fs_info->qgroup_lock);
|
||||||
|
|
||||||
ret = update_qgroup_limit_item(trans, quota_root, qgroup);
|
ret = update_qgroup_limit_item(trans, qgroup);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
fs_info->qgroup_flags |= BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT;
|
fs_info->qgroup_flags |= BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT;
|
||||||
btrfs_info(fs_info, "unable to update quota limit for %llu",
|
btrfs_info(fs_info, "unable to update quota limit for %llu",
|
||||||
|
@ -2214,7 +2214,7 @@ int btrfs_run_qgroups(struct btrfs_trans_handle *trans,
|
||||||
if (ret)
|
if (ret)
|
||||||
fs_info->qgroup_flags |=
|
fs_info->qgroup_flags |=
|
||||||
BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT;
|
BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT;
|
||||||
ret = update_qgroup_limit_item(trans, quota_root, qgroup);
|
ret = update_qgroup_limit_item(trans, qgroup);
|
||||||
if (ret)
|
if (ret)
|
||||||
fs_info->qgroup_flags |=
|
fs_info->qgroup_flags |=
|
||||||
BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT;
|
BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT;
|
||||||
|
@ -2323,7 +2323,7 @@ int btrfs_qgroup_inherit(struct btrfs_trans_handle *trans,
|
||||||
dstgroup->rsv_rfer = inherit->lim.rsv_rfer;
|
dstgroup->rsv_rfer = inherit->lim.rsv_rfer;
|
||||||
dstgroup->rsv_excl = inherit->lim.rsv_excl;
|
dstgroup->rsv_excl = inherit->lim.rsv_excl;
|
||||||
|
|
||||||
ret = update_qgroup_limit_item(trans, quota_root, dstgroup);
|
ret = update_qgroup_limit_item(trans, dstgroup);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
fs_info->qgroup_flags |= BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT;
|
fs_info->qgroup_flags |= BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT;
|
||||||
btrfs_info(fs_info,
|
btrfs_info(fs_info,
|
||||||
|
|
Loading…
Reference in a new issue