Commit 3e07e9a0 authored by Lu Fengqi's avatar Lu Fengqi Committed by David Sterba

btrfs: qgroup: Drop root parameter from update_qgroup_info_item

It can be fetched from the transaction handle.
Signed-off-by: default avatarLu Fengqi <lufq.fnst@cn.fujitsu.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent ac8a866a
...@@ -742,9 +742,10 @@ static int update_qgroup_limit_item(struct btrfs_trans_handle *trans, ...@@ -742,9 +742,10 @@ static int update_qgroup_limit_item(struct btrfs_trans_handle *trans,
} }
static int update_qgroup_info_item(struct btrfs_trans_handle *trans, static int update_qgroup_info_item(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
struct btrfs_qgroup *qgroup) struct btrfs_qgroup *qgroup)
{ {
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;
...@@ -752,7 +753,7 @@ static int update_qgroup_info_item(struct btrfs_trans_handle *trans, ...@@ -752,7 +753,7 @@ static int update_qgroup_info_item(struct btrfs_trans_handle *trans,
int ret; int ret;
int slot; int slot;
if (btrfs_is_testing(root->fs_info)) if (btrfs_is_testing(fs_info))
return 0; return 0;
key.objectid = 0; key.objectid = 0;
...@@ -763,7 +764,7 @@ static int update_qgroup_info_item(struct btrfs_trans_handle *trans, ...@@ -763,7 +764,7 @@ static int update_qgroup_info_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;
...@@ -2210,7 +2211,7 @@ int btrfs_run_qgroups(struct btrfs_trans_handle *trans, ...@@ -2210,7 +2211,7 @@ int btrfs_run_qgroups(struct btrfs_trans_handle *trans,
struct btrfs_qgroup, dirty); struct btrfs_qgroup, dirty);
list_del_init(&qgroup->dirty); list_del_init(&qgroup->dirty);
spin_unlock(&fs_info->qgroup_lock); spin_unlock(&fs_info->qgroup_lock);
ret = update_qgroup_info_item(trans, quota_root, qgroup); ret = update_qgroup_info_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;
......
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