summaryrefslogtreecommitdiff
path: root/extent-tree.c
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2018-05-28 09:36:41 +0300
committerDavid Sterba <dsterba@suse.com>2018-06-07 16:37:36 +0200
commitb4c4ff9c4a15eb0d97ab9dd6f12f7bc9774d0d7b (patch)
tree0638f5a2dd682e2ba90a4ff4e0071dfd7e9e1f9d /extent-tree.c
parent48663d6e64d596ea6214089140b65708b3112bf2 (diff)
btrfs-progs: check: Remove root parameter from btrfs_fix_block_accounting
It's always set to extent_root and the function already takes a transaction handle where fs_info could be referenced and in turn the extent_tree. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Su Yue <suy.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'extent-tree.c')
-rw-r--r--extent-tree.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/extent-tree.c b/extent-tree.c
index 1b8a4f8..3132ccc 100644
--- a/extent-tree.c
+++ b/extent-tree.c
@@ -3788,8 +3788,7 @@ out:
* Fixup block accounting. The initial block accounting created by
* make_block_groups isn't accuracy in this case.
*/
-int btrfs_fix_block_accounting(struct btrfs_trans_handle *trans,
- struct btrfs_root *root)
+int btrfs_fix_block_accounting(struct btrfs_trans_handle *trans)
{
int ret = 0;
int slot;
@@ -3799,9 +3798,8 @@ int btrfs_fix_block_accounting(struct btrfs_trans_handle *trans,
struct btrfs_key key;
struct extent_buffer *leaf;
struct btrfs_block_group_cache *cache;
- struct btrfs_fs_info *fs_info = root->fs_info;
-
- root = root->fs_info->extent_root;
+ struct btrfs_fs_info *fs_info = trans->fs_info;
+ struct btrfs_root *root = fs_info->extent_root;
while(extent_root_pending_ops(fs_info)) {
ret = finish_current_insert(trans, root);