Skip to content

Commit 7ab5cb2

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

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

fs/btrfs/extent_io.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -726,14 +726,6 @@ static int __clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
726726
start = last_end + 1;
727727
if (start <= end && state && !need_resched())
728728
goto hit_next;
729-
goto search_again;
730-
731-
out:
732-
spin_unlock(&tree->lock);
733-
if (prealloc)
734-
free_extent_state(prealloc);
735-
736-
return 0;
737729

738730
search_again:
739731
if (start > end)
@@ -742,6 +734,14 @@ static int __clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
742734
if (gfpflags_allow_blocking(mask))
743735
cond_resched();
744736
goto again;
737+
738+
out:
739+
spin_unlock(&tree->lock);
740+
if (prealloc)
741+
free_extent_state(prealloc);
742+
743+
return 0;
744+
745745
}
746746

747747
static void wait_on_state(struct extent_io_tree *tree,

0 commit comments

Comments
 (0)