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

Commit 3acd3953 authored by Mark Fasheh's avatar Mark Fasheh Committed by David Sterba
Browse files

btrfs: Remove BUG_ON from __finish_chunk_alloc()



btrfs_alloc_chunk() unconditionally BUGs on any error returned from
__finish_chunk_alloc() so there's no need for two BUG_ON lines. Remove the
one from __finish_chunk_alloc().

Signed-off-by: default avatarMark Fasheh <mfasheh@suse.de>
parent 1dd4602f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -3383,7 +3383,8 @@ static int __finish_chunk_alloc(struct btrfs_trans_handle *trans,
		device = map->stripes[index].dev;
		device->bytes_used += stripe_size;
		ret = btrfs_update_device(trans, device);
		BUG_ON(ret);
		if (ret)
			goto out_free;
		index++;
	}

@@ -3430,6 +3431,7 @@ static int __finish_chunk_alloc(struct btrfs_trans_handle *trans,
					     item_size);
	}

out_free:
	kfree(chunk);
	return ret;
}