diff options
author | Shilong Wang <wangshilong1991@gmail.com> | 2015-04-12 14:35:20 +0800 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-07-01 17:17:22 -0700 |
commit | 9689457b5b0a2b69874c421a489d3fb50ca76b7b (patch) | |
tree | 754a94f1914b827ee205ca314871976321598cf4 | |
parent | ddba1bfc2369cd0566bcfdab47599834a32d1c19 (diff) | |
download | op-kernel-dev-9689457b5b0a2b69874c421a489d3fb50ca76b7b.zip op-kernel-dev-9689457b5b0a2b69874c421a489d3fb50ca76b7b.tar.gz |
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>
-rw-r--r-- | fs/btrfs/relocation.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 827951f..88cbb59 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; |