summaryrefslogtreecommitdiff
path: root/fs/btrfs/zoned.c
diff options
context:
space:
mode:
authorNaohiro Aota <naohiro.aota@wdc.com>2021-08-19 15:19:09 +0300
committerDavid Sterba <dsterba@suse.com>2021-10-26 20:07:58 +0300
commitc46c4247ab046b11806cdb10e04395c2f2cd1e41 (patch)
tree33ca9ff3704da3d0cddaee9ba5739ba3d434f282 /fs/btrfs/zoned.c
parent8eae532be75317ec59ff6fd68994b986d017502d (diff)
downloadlinux-c46c4247ab046b11806cdb10e04395c2f2cd1e41.tar.xz
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>
Diffstat (limited to 'fs/btrfs/zoned.c')
-rw-r--r--fs/btrfs/zoned.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
index 10ea5c12c4ba..dd545af225e8 100644
--- a/fs/btrfs/zoned.c
+++ b/fs/btrfs/zoned.c
@@ -1273,9 +1273,6 @@ void btrfs_calc_zone_unusable(struct btrfs_block_group *cache)
cache->cached = BTRFS_CACHE_FINISHED;
cache->free_space_ctl->free_space = free;
cache->zone_unusable = unusable;
-
- /* Should not have any excluded extents. Just in case, though */
- btrfs_free_excluded_extents(cache);
}
void btrfs_redirty_list_add(struct btrfs_transaction *trans,