Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.com>2016-11-03 13:16:58 +0100
committerMichal Marek <mmarek@suse.com>2016-11-03 13:16:58 +0100
commite95f232857c7d9a9f5f527c8f8c2e4772f7fbcfc (patch)
tree3bae945fd297c02f7f7021c69272d9d9f057223c
parent75cb41bc9b39171c02b80c542003456170f7e20b (diff)
Btrfs: fix endless loop in balancing block groups (bsc#1006804).rpm-4.4.21-81-dirty
-rw-r--r--fs/btrfs/relocation.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index d1315b56f749..9b14c9c9105c 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -4182,9 +4182,11 @@ restart:
err = PTR_ERR(trans);
goto out_free;
}
- err = qgroup_fix_relocated_data_extents(trans, rc);
- if (err < 0) {
- btrfs_abort_transaction(trans, rc->extent_root, err);
+ ret = qgroup_fix_relocated_data_extents(trans, rc);
+ if (ret < 0) {
+ btrfs_abort_transaction(trans, rc->extent_root, ret);
+ if (!err)
+ err = ret;
goto out_free;
}
btrfs_commit_transaction(trans, rc->extent_root);