]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
btrfs: remove pointless out label from modify_free_space_bitmap()
authorFilipe Manana <fdmanana@suse.com>
Wed, 11 Jun 2025 11:54:53 +0000 (12:54 +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 4cd1f46cd694acdc4aa0ef4dad531bfd6a2125cc..a4909393840acca0dfeebc4197519729a5896d17 100644 (file)
@@ -630,7 +630,7 @@ static int modify_free_space_bitmap(struct btrfs_trans_handle *trans,
 
                ret = btrfs_search_prev_slot(trans, root, &key, path, 0, 1);
                if (ret)
-                       goto out;
+                       return ret;
 
                prev_bit_set = free_space_test_bit(block_group, path, prev_block);
 
@@ -639,7 +639,7 @@ static int modify_free_space_bitmap(struct btrfs_trans_handle *trans,
                if (start >= key.objectid + key.offset) {
                        ret = free_space_next_bitmap(trans, root, path);
                        if (ret)
-                               goto out;
+                               return ret;
                }
        } else {
                key.objectid = start;
@@ -648,7 +648,7 @@ static int modify_free_space_bitmap(struct btrfs_trans_handle *trans,
 
                ret = btrfs_search_prev_slot(trans, root, &key, path, 0, 1);
                if (ret)
-                       goto out;
+                       return ret;
        }
 
        /*
@@ -664,7 +664,7 @@ static int modify_free_space_bitmap(struct btrfs_trans_handle *trans,
                        break;
                ret = free_space_next_bitmap(trans, root, path);
                if (ret)
-                       goto out;
+                       return ret;
        }
 
        /*
@@ -677,7 +677,7 @@ static int modify_free_space_bitmap(struct btrfs_trans_handle *trans,
                if (end >= key.objectid + key.offset) {
                        ret = free_space_next_bitmap(trans, root, path);
                        if (ret)
-                               goto out;
+                               return ret;
                }
 
                next_bit_set = free_space_test_bit(block_group, path, end);
@@ -706,11 +706,7 @@ static int modify_free_space_bitmap(struct btrfs_trans_handle *trans,
        }
 
        btrfs_release_path(path);
-       ret = update_free_space_extent_count(trans, block_group, path,
-                                            new_extents);
-
-out:
-       return ret;
+       return update_free_space_extent_count(trans, block_group, path, new_extents);
 }
 
 static int remove_free_space_extent(struct btrfs_trans_handle *trans,