Commit 2efcd25a authored by Filipe Manana's avatar Filipe Manana Committed by David Sterba
Browse files

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: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: default avatarFilipe Manana <fdmanana@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 1038614e
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -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)