btrfs: factor out check_removing_space_info() from btrfs_free_block_groups()

[ Upstream commit 1cfdbe0d53 ]

Factor out check_removing_space_info() from btrfs_free_block_groups(). It
sanity checks a to-be-removed space_info. There is no functional change.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Stable-dep-of: a11224a016 ("btrfs: fix memory leaks in create_space_info() error paths")
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Naohiro Aota 2025-04-23 11:43:45 +09:00 • committed by Greg Kroah-Hartman
commit d046ff8e55