mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-05 07:08:06 -04:00
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>
This commit is contained in:
committed by
David Sterba
parent
1038614e8f
commit
2efcd25a76
@@ -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 @@ static int load_extent_tree_free(struct btrfs_caching_control *caching_ctl)
|
||||
|
||||
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 @@ static int load_extent_tree_free(struct btrfs_caching_control *caching_ctl)
|
||||
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 @@ static int load_extent_tree_free(struct btrfs_caching_control *caching_ctl)
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user