btrfs: zoned: move btrfs_free_excluded_extents out of btrfs_calc_zone_unusable
authorNaohiro Aota <naohiro.aota@wdc.com>
Thu, 19 Aug 2021 12:19:09 +0000 (21:19 +0900)
committerDavid Sterba <dsterba@suse.com>
Tue, 26 Oct 2021 17:07:58 +0000 (19:07 +0200)
commitc46c4247ab046b11806cdb10e04395c2f2cd1e41
tree33ca9ff3704da3d0cddaee9ba5739ba3d434f282
parent8eae532be75317ec59ff6fd68994b986d017502d
btrfs: zoned: move btrfs_free_excluded_extents out of btrfs_calc_zone_unusable

btrfs_free_excluded_extents() is not neccessary for
btrfs_calc_zone_unusable() and it makes btrfs_calc_zone_unusable()
difficult to reuse. Move it out and call btrfs_free_excluded_extents()
in proper context.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.c
fs/btrfs/zoned.c