]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
btrfs: remove pointless out label from load_free_space_bitmaps()
authorFilipe Manana <fdmanana@suse.com>
Wed, 11 Jun 2025 12:04:59 +0000 (13:04 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jul 2025 21:58:02 +0000 (23:58 +0200)
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>
fs/btrfs/free-space-tree.c

index 1f76860ec61e015f50da242fa0862e0a3282078e..0514b0a045726d09815bc5b83b162c6ffc06a899 100644 (file)
@@ -1554,7 +1554,7 @@ static int load_free_space_bitmaps(struct btrfs_caching_control *caching_ctl,
        while (1) {
                ret = btrfs_next_item(root, path);
                if (ret < 0)
-                       goto out;
+                       return ret;
                if (ret)
                        break;
 
@@ -1581,7 +1581,7 @@ static int load_free_space_bitmaps(struct btrfs_caching_control *caching_ctl,
                                                               offset,
                                                               &space_added);
                                if (ret)
-                                       goto out;
+                                       return ret;
                                total_found += space_added;
                                if (total_found > CACHING_CTL_WAKE_UP) {
                                        total_found = 0;
@@ -1596,7 +1596,7 @@ static int load_free_space_bitmaps(struct btrfs_caching_control *caching_ctl,
        if (prev_bit_set) {
                ret = btrfs_add_new_free_space(block_group, extent_start, end, NULL);
                if (ret)
-                       goto out;
+                       return ret;
                extent_count++;
        }
 
@@ -1606,13 +1606,10 @@ static int load_free_space_bitmaps(struct btrfs_caching_control *caching_ctl,
                          block_group->start, extent_count,
                          expected_extent_count);
                DEBUG_WARN();
-               ret = -EIO;
-               goto out;
+               return -EIO;
        }
 
-       ret = 0;
-out:
-       return ret;
+       return 0;
 }
 
 static int load_free_space_extents(struct btrfs_caching_control *caching_ctl,