From: Filipe Manana Date: Tue, 20 Jan 2026 19:59:13 +0000 (+0000) Subject: btrfs: remove out label in load_extent_tree_free() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2efcd25a7638dd217e2fea01107416e24a2d1935;p=thirdparty%2Fkernel%2Flinux.git btrfs: remove out label in load_extent_tree_free() There is no point in having the label since all it does is return the value in the 'ret' variable. Instead make every goto return directly and remove the label. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c index 28aa87872f0d9..3a0521236ecd8 100644 --- a/fs/btrfs/block-group.c +++ b/fs/btrfs/block-group.c @@ -766,7 +766,7 @@ static int load_extent_tree_free(struct btrfs_caching_control *caching_ctl) next: ret = btrfs_search_slot(NULL, extent_root, &key, path, 0, 0); if (ret < 0) - goto out; + return ret; leaf = path->nodes[0]; nritems = btrfs_header_nritems(leaf); @@ -797,7 +797,7 @@ next: ret = btrfs_next_leaf(extent_root, path); if (ret < 0) - goto out; + return ret; if (ret) break; leaf = path->nodes[0]; @@ -828,7 +828,7 @@ next: ret = btrfs_add_new_free_space(block_group, last, key.objectid, &space_added); if (ret) - goto out; + return ret; total_found += space_added; if (key.type == BTRFS_METADATA_ITEM_KEY) last = key.objectid + @@ -847,9 +847,7 @@ next: path->slots[0]++; } - ret = btrfs_add_new_free_space(block_group, last, block_group_end, NULL); -out: - return ret; + return btrfs_add_new_free_space(block_group, last, block_group_end, NULL); } static inline void btrfs_free_excluded_extents(const struct btrfs_block_group *bg)