btrfs: qgroup: Drop quota_root and fs_info parameters from update_qgroup_status_item
They 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
3e07e9a09f
commit
2e980acdd8
|
@ -787,10 +787,10 @@ out:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int update_qgroup_status_item(struct btrfs_trans_handle *trans,
|
static int update_qgroup_status_item(struct btrfs_trans_handle *trans)
|
||||||
struct btrfs_fs_info *fs_info,
|
|
||||||
struct btrfs_root *root)
|
|
||||||
{
|
{
|
||||||
|
struct btrfs_fs_info *fs_info = trans->fs_info;
|
||||||
|
struct btrfs_root *quota_root = 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;
|
||||||
|
@ -806,7 +806,7 @@ static int update_qgroup_status_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;
|
||||||
|
|
||||||
|
@ -2227,7 +2227,7 @@ int btrfs_run_qgroups(struct btrfs_trans_handle *trans,
|
||||||
fs_info->qgroup_flags &= ~BTRFS_QGROUP_STATUS_FLAG_ON;
|
fs_info->qgroup_flags &= ~BTRFS_QGROUP_STATUS_FLAG_ON;
|
||||||
spin_unlock(&fs_info->qgroup_lock);
|
spin_unlock(&fs_info->qgroup_lock);
|
||||||
|
|
||||||
ret = update_qgroup_status_item(trans, fs_info, quota_root);
|
ret = update_qgroup_status_item(trans);
|
||||||
if (ret)
|
if (ret)
|
||||||
fs_info->qgroup_flags |= BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT;
|
fs_info->qgroup_flags |= BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT;
|
||||||
|
|
||||||
|
@ -2795,7 +2795,7 @@ out:
|
||||||
err);
|
err);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
ret = update_qgroup_status_item(trans, fs_info, fs_info->quota_root);
|
ret = update_qgroup_status_item(trans);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
err = ret;
|
err = ret;
|
||||||
btrfs_err(fs_info, "fail to update qgroup status: %d", err);
|
btrfs_err(fs_info, "fail to update qgroup status: %d", err);
|
||||||
|
|
Loading…
Reference in New Issue