Btrfs: Fix space checking during fs resize

Fix out-of-space checking, addressing a warning and potential resource
leak when resizing the filesystem down while allocating blocks.

Signed-off-by: Daniel J Blueman <daniel@quora.org>
Reviewed-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
Daniel J Blueman 2012-04-27 12:41:46 -04:00 committed by Chris Mason
parent 1f699d38b6
commit 7654b72417
1 changed files with 1 additions and 1 deletions

View File

@ -3813,7 +3813,7 @@ static noinline_for_stack int relocate_block_group(struct reloc_control *rc)
ret = btrfs_block_rsv_check(rc->extent_root, rc->block_rsv, 5);
if (ret < 0) {
if (ret != -EAGAIN) {
if (ret != -ENOSPC) {
err = ret;
WARN_ON(1);
break;