Skip to content

Commit 8bf3db7

Browse files
fdmananakdave
authored andcommitted
btrfs: remove pointless out label from modify_free_space_bitmap()
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 <[email protected]> Signed-off-by: Filipe Manana <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent c8c2c65 commit 8bf3db7

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

fs/btrfs/free-space-tree.c

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ static int modify_free_space_bitmap(struct btrfs_trans_handle *trans,
630630

631631
ret = btrfs_search_prev_slot(trans, root, &key, path, 0, 1);
632632
if (ret)
633-
goto out;
633+
return ret;
634634

635635
prev_bit_set = free_space_test_bit(block_group, path, prev_block);
636636

@@ -639,7 +639,7 @@ static int modify_free_space_bitmap(struct btrfs_trans_handle *trans,
639639
if (start >= key.objectid + key.offset) {
640640
ret = free_space_next_bitmap(trans, root, path);
641641
if (ret)
642-
goto out;
642+
return ret;
643643
}
644644
} else {
645645
key.objectid = start;
@@ -648,7 +648,7 @@ static int modify_free_space_bitmap(struct btrfs_trans_handle *trans,
648648

649649
ret = btrfs_search_prev_slot(trans, root, &key, path, 0, 1);
650650
if (ret)
651-
goto out;
651+
return ret;
652652
}
653653

654654
/*
@@ -664,7 +664,7 @@ static int modify_free_space_bitmap(struct btrfs_trans_handle *trans,
664664
break;
665665
ret = free_space_next_bitmap(trans, root, path);
666666
if (ret)
667-
goto out;
667+
return ret;
668668
}
669669

670670
/*
@@ -677,7 +677,7 @@ static int modify_free_space_bitmap(struct btrfs_trans_handle *trans,
677677
if (end >= key.objectid + key.offset) {
678678
ret = free_space_next_bitmap(trans, root, path);
679679
if (ret)
680-
goto out;
680+
return ret;
681681
}
682682

683683
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,
706706
}
707707

708708
btrfs_release_path(path);
709-
ret = update_free_space_extent_count(trans, block_group, path,
710-
new_extents);
711-
712-
out:
713-
return ret;
709+
return update_free_space_extent_count(trans, block_group, path, new_extents);
714710
}
715711

716712
static int remove_free_space_extent(struct btrfs_trans_handle *trans,

0 commit comments

Comments
 (0)