Skip to content

Commit

Permalink
Btrfs: Fix space checking during fs resize
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel J Blueman authored and Chris Mason committed Apr 27, 2012
1 parent 1f699d3 commit 7654b72
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 @@ -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;
Expand Down

0 comments on commit 7654b72

Please sign in to comment.