summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorShilong Wang <wangshilong1991@gmail.com>2015-04-12 09:35:20 +0300
committerChris Mason <clm@fb.com>2015-07-02 03:17:22 +0300
commit9689457b5b0a2b69874c421a489d3fb50ca76b7b (patch)
tree754a94f1914b827ee205ca314871976321598cf4 /fs
parentddba1bfc2369cd0566bcfdab47599834a32d1c19 (diff)
downloadlinux-9689457b5b0a2b69874c421a489d3fb50ca76b7b.tar.xz
Btrfs: fix wrong check for btrfs_force_chunk_alloc()
btrfs_force_chunk_alloc() return 1 for allocation chunk successfully. This problem exists since commit c87f08ca4. With this patch, we might fix some enospc problems for balances. Signed-off-by: Wang Shilong <wangshilong1991@gmail.com> Reviewed-by: Filipe Manana <fdmanana@suse.com> Tested-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/relocation.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 827951fbf7fc..88cbb5995667 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -4049,7 +4049,7 @@ restart:
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;