Commit deb40627 authored by Lu Fengqi's avatar Lu Fengqi Committed by David Sterba

btrfs: qgroup: Drop root parameter from btrfs_qgroup_trace_subtree

The fs_info can be fetched from the transaction handle directly.
Signed-off-by: default avatarLu Fengqi <lufq.fnst@cn.fujitsu.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 8d38d7eb
...@@ -8660,7 +8660,7 @@ static noinline int do_walk_down(struct btrfs_trans_handle *trans, ...@@ -8660,7 +8660,7 @@ static noinline int do_walk_down(struct btrfs_trans_handle *trans,
} }
if (need_account) { if (need_account) {
ret = btrfs_qgroup_trace_subtree(trans, root, next, ret = btrfs_qgroup_trace_subtree(trans, next,
generation, level - 1); generation, level - 1);
if (ret) { if (ret) {
btrfs_err_rl(fs_info, btrfs_err_rl(fs_info,
......
...@@ -1714,11 +1714,10 @@ static int adjust_slots_upwards(struct btrfs_path *path, int root_level) ...@@ -1714,11 +1714,10 @@ static int adjust_slots_upwards(struct btrfs_path *path, int root_level)
} }
int btrfs_qgroup_trace_subtree(struct btrfs_trans_handle *trans, int btrfs_qgroup_trace_subtree(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
struct extent_buffer *root_eb, struct extent_buffer *root_eb,
u64 root_gen, int root_level) u64 root_gen, int root_level)
{ {
struct btrfs_fs_info *fs_info = root->fs_info; struct btrfs_fs_info *fs_info = trans->fs_info;
int ret = 0; int ret = 0;
int level; int level;
struct extent_buffer *eb = root_eb; struct extent_buffer *eb = root_eb;
......
...@@ -234,7 +234,6 @@ int btrfs_qgroup_trace_leaf_items(struct btrfs_trans_handle *trans, ...@@ -234,7 +234,6 @@ int btrfs_qgroup_trace_leaf_items(struct btrfs_trans_handle *trans,
* Return <0 for error(ENOMEM or tree search error) * Return <0 for error(ENOMEM or tree search error)
*/ */
int btrfs_qgroup_trace_subtree(struct btrfs_trans_handle *trans, int btrfs_qgroup_trace_subtree(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
struct extent_buffer *root_eb, struct extent_buffer *root_eb,
u64 root_gen, int root_level); u64 root_gen, int root_level);
int int
......
...@@ -1879,13 +1879,12 @@ int replace_path(struct btrfs_trans_handle *trans, ...@@ -1879,13 +1879,12 @@ int replace_path(struct btrfs_trans_handle *trans,
* and tree block numbers, if current trans doesn't free * and tree block numbers, if current trans doesn't free
* data reloc tree inode. * data reloc tree inode.
*/ */
ret = btrfs_qgroup_trace_subtree(trans, src, parent, ret = btrfs_qgroup_trace_subtree(trans, parent,
btrfs_header_generation(parent), btrfs_header_generation(parent),
btrfs_header_level(parent)); btrfs_header_level(parent));
if (ret < 0) if (ret < 0)
break; break;
ret = btrfs_qgroup_trace_subtree(trans, dest, ret = btrfs_qgroup_trace_subtree(trans, path->nodes[level],
path->nodes[level],
btrfs_header_generation(path->nodes[level]), btrfs_header_generation(path->nodes[level]),
btrfs_header_level(path->nodes[level])); btrfs_header_level(path->nodes[level]));
if (ret < 0) if (ret < 0)
......
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