Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7654b724 authored by Daniel J Blueman's avatar Daniel J Blueman Committed by Chris Mason
Browse files

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: default avatarDaniel J Blueman <daniel@quora.org>
Reviewed-by: default avatarJosef Bacik <josef@redhat.com>
Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 1f699d38
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;