Skip to content

Commit 7139cc7

Browse files
fdmananakdave
authored andcommitted
btrfs: remove pointless out label from load_free_space_bitmaps()
All we do under the label is to return, so there's no point in having it, just return directly whenever we get an error. Reviewed-by: Boris Burkov <boris@bur.io> Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 753b146 commit 7139cc7

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

fs/btrfs/free-space-tree.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,7 @@ static int load_free_space_bitmaps(struct btrfs_caching_control *caching_ctl,
15541554
while (1) {
15551555
ret = btrfs_next_item(root, path);
15561556
if (ret < 0)
1557-
goto out;
1557+
return ret;
15581558
if (ret)
15591559
break;
15601560

@@ -1581,7 +1581,7 @@ static int load_free_space_bitmaps(struct btrfs_caching_control *caching_ctl,
15811581
offset,
15821582
&space_added);
15831583
if (ret)
1584-
goto out;
1584+
return ret;
15851585
total_found += space_added;
15861586
if (total_found > CACHING_CTL_WAKE_UP) {
15871587
total_found = 0;
@@ -1596,7 +1596,7 @@ static int load_free_space_bitmaps(struct btrfs_caching_control *caching_ctl,
15961596
if (prev_bit_set) {
15971597
ret = btrfs_add_new_free_space(block_group, extent_start, end, NULL);
15981598
if (ret)
1599-
goto out;
1599+
return ret;
16001600
extent_count++;
16011601
}
16021602

@@ -1606,13 +1606,10 @@ static int load_free_space_bitmaps(struct btrfs_caching_control *caching_ctl,
16061606
block_group->start, extent_count,
16071607
expected_extent_count);
16081608
DEBUG_WARN();
1609-
ret = -EIO;
1610-
goto out;
1609+
return -EIO;
16111610
}
16121611

1613-
ret = 0;
1614-
out:
1615-
return ret;
1612+
return 0;
16161613
}
16171614

16181615
static int load_free_space_extents(struct btrfs_caching_control *caching_ctl,

0 commit comments

Comments
 (0)