Skip to content

Commit

Permalink
Btrfs: fix wrong check for btrfs_force_chunk_alloc()
Browse files Browse the repository at this point in the history
btrfs_force_chunk_alloc() return 1 for allocation chunk successfully.
This problem exists since commit c87f08c.

With this patch, we might fix some enospc problems for balances.

Signed-off-by: Wang Shilong <[email protected]>
Reviewed-by: Filipe Manana <[email protected]>
Tested-by: Filipe Manana <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
  • Loading branch information
wangshilong authored and masoncl committed Jul 2, 2015
1 parent ddba1bf commit 9689457
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/relocation.c
Original file line number Diff line number Diff line change
Expand Up @@ -4049,7 +4049,7 @@ static noinline_for_stack int relocate_block_group(struct reloc_control *rc)
if (trans && progress && err == -ENOSPC) {
ret = btrfs_force_chunk_alloc(trans, rc->extent_root,
rc->block_group->flags);
if (ret == 0) {
if (ret == 1) {
err = 0;
progress = 0;
goto restart;
Expand Down

0 comments on commit 9689457

Please sign in to comment.