Skip to content

Commit deb3a8a

Browse files
fdmananakdave
authored andcommitted
btrfs: remove pointless out label from load_free_space_extents()
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 7139cc7 commit deb3a8a

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

fs/btrfs/free-space-tree.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1636,7 +1636,7 @@ static int load_free_space_extents(struct btrfs_caching_control *caching_ctl,
16361636

16371637
ret = btrfs_next_item(root, path);
16381638
if (ret < 0)
1639-
goto out;
1639+
return ret;
16401640
if (ret)
16411641
break;
16421642

@@ -1652,7 +1652,7 @@ static int load_free_space_extents(struct btrfs_caching_control *caching_ctl,
16521652
key.objectid + key.offset,
16531653
&space_added);
16541654
if (ret)
1655-
goto out;
1655+
return ret;
16561656
total_found += space_added;
16571657
if (total_found > CACHING_CTL_WAKE_UP) {
16581658
total_found = 0;
@@ -1667,13 +1667,10 @@ static int load_free_space_extents(struct btrfs_caching_control *caching_ctl,
16671667
block_group->start, extent_count,
16681668
expected_extent_count);
16691669
DEBUG_WARN();
1670-
ret = -EIO;
1671-
goto out;
1670+
return -EIO;
16721671
}
16731672

1674-
ret = 0;
1675-
out:
1676-
return ret;
1673+
return 0;
16771674
}
16781675

16791676
int load_free_space_tree(struct btrfs_caching_control *caching_ctl)

0 commit comments

Comments
 (0)