Skip to content

Commit 03bf538

Browse files
committed
btrfs: untangle gotos a bit in convert_extent_bit
Signed-off-by: David Sterba <[email protected]>
1 parent 7ab5cb2 commit 03bf538

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

fs/btrfs/extent_io.c

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,15 +1262,6 @@ int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
12621262
goto out;
12631263
}
12641264

1265-
goto search_again;
1266-
1267-
out:
1268-
spin_unlock(&tree->lock);
1269-
if (prealloc)
1270-
free_extent_state(prealloc);
1271-
1272-
return err;
1273-
12741265
search_again:
12751266
if (start > end)
12761267
goto out;
@@ -1279,6 +1270,13 @@ int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
12791270
cond_resched();
12801271
first_iteration = false;
12811272
goto again;
1273+
1274+
out:
1275+
spin_unlock(&tree->lock);
1276+
if (prealloc)
1277+
free_extent_state(prealloc);
1278+
1279+
return err;
12821280
}
12831281

12841282
/* wrappers around set/clear extent bit */

0 commit comments

Comments
 (0)