diff options
| author | Filipe Manana <fdmanana@suse.com> | 2026-01-20 19:59:13 +0000 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2026-02-03 07:56:22 +0100 |
| commit | 2efcd25a7638dd217e2fea01107416e24a2d1935 (patch) | |
| tree | fe8a1c4ddaed14b47ec0e0b0316fbdf3156687f5 | |
| parent | 1038614e8f2c045561db0cf2b064a0e5cb909a1c (diff) | |
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 <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
| -rw-r--r-- | fs/btrfs/block-group.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c index 28aa87872f0d..3a0521236ecd 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) |
