summaryrefslogtreecommitdiff
path: root/cmds-check.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmds-check.c')
-rw-r--r--cmds-check.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/cmds-check.c b/cmds-check.c
index e7d4edfc..cb5ed3e8 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -6008,6 +6008,12 @@ static int reinit_extent_tree(struct btrfs_fs_info *fs_info)
return ret;
}
+ ret = reset_balance(trans, fs_info);
+ if (ret) {
+ fprintf(stderr, "error reseting the pending balance\n");
+ return ret;
+ }
+
/* Ok we can allocate now, reinit the extent root */
ret = btrfs_fsck_reinit_root(trans, fs_info->extent_root, 0);
if (ret) {
@@ -6020,12 +6026,6 @@ static int reinit_extent_tree(struct btrfs_fs_info *fs_info)
return ret;
}
- ret = reset_balance(trans, fs_info);
- if (ret) {
- fprintf(stderr, "error reseting the pending balance\n");
- return ret;
- }
-
/*
* Now we have all the in-memory block groups setup so we can make
* allocations properly, and the metadata we care about is safe since we