diff options
author | Lu Fengqi <lufq.fnst@cn.fujitsu.com> | 2018-07-18 02:45:28 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-08-06 07:12:50 -0400 |
commit | 3e07e9a09f27868dbc63d07db8677fcd256e3bbc (patch) | |
tree | 0b593b7e6586303d166f65b85b87400c3a4aee1e /fs/btrfs/qgroup.c | |
parent | ac8a866af17edc692b50cbdd2aec612de4205c8f (diff) |
btrfs: qgroup: Drop root parameter from update_qgroup_info_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>
Diffstat (limited to 'fs/btrfs/qgroup.c')
-rw-r--r-- | fs/btrfs/qgroup.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index 44e1462e0f76..f4b25e0a32f8 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c | |||
@@ -742,9 +742,10 @@ out: | |||
742 | } | 742 | } |
743 | 743 | ||
744 | static int update_qgroup_info_item(struct btrfs_trans_handle *trans, | 744 | static int update_qgroup_info_item(struct btrfs_trans_handle *trans, |
745 | struct btrfs_root *root, | ||
746 | struct btrfs_qgroup *qgroup) | 745 | struct btrfs_qgroup *qgroup) |
747 | { | 746 | { |
747 | struct btrfs_fs_info *fs_info = trans->fs_info; | ||
748 | struct btrfs_root *quota_root = fs_info->quota_root; | ||
748 | struct btrfs_path *path; | 749 | struct btrfs_path *path; |
749 | struct btrfs_key key; | 750 | struct btrfs_key key; |
750 | struct extent_buffer *l; | 751 | struct extent_buffer *l; |
@@ -752,7 +753,7 @@ static int update_qgroup_info_item(struct btrfs_trans_handle *trans, | |||
752 | int ret; | 753 | int ret; |
753 | int slot; | 754 | int slot; |
754 | 755 | ||
755 | if (btrfs_is_testing(root->fs_info)) | 756 | if (btrfs_is_testing(fs_info)) |
756 | return 0; | 757 | return 0; |
757 | 758 | ||
758 | key.objectid = 0; | 759 | key.objectid = 0; |
@@ -763,7 +764,7 @@ static int update_qgroup_info_item(struct btrfs_trans_handle *trans, | |||
763 | if (!path) | 764 | if (!path) |
764 | return -ENOMEM; | 765 | return -ENOMEM; |
765 | 766 | ||
766 | ret = btrfs_search_slot(trans, root, &key, path, 0, 1); | 767 | ret = btrfs_search_slot(trans, quota_root, &key, path, 0, 1); |
767 | if (ret > 0) | 768 | if (ret > 0) |
768 | ret = -ENOENT; | 769 | ret = -ENOENT; |
769 | 770 | ||
@@ -2210,7 +2211,7 @@ int btrfs_run_qgroups(struct btrfs_trans_handle *trans, | |||
2210 | struct btrfs_qgroup, dirty); | 2211 | struct btrfs_qgroup, dirty); |
2211 | list_del_init(&qgroup->dirty); | 2212 | list_del_init(&qgroup->dirty); |
2212 | spin_unlock(&fs_info->qgroup_lock); | 2213 | spin_unlock(&fs_info->qgroup_lock); |
2213 | ret = update_qgroup_info_item(trans, quota_root, qgroup); | 2214 | ret = update_qgroup_info_item(trans, qgroup); |
2214 | if (ret) | 2215 | if (ret) |
2215 | fs_info->qgroup_flags |= | 2216 | fs_info->qgroup_flags |= |
2216 | BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT; | 2217 | BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT; |