Skip to content

Commit b5a4ba1

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

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

fs/btrfs/extent_io.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,7 +1037,13 @@ __set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
10371037
goto out;
10381038
}
10391039

1040-
goto search_again;
1040+
search_again:
1041+
if (start > end)
1042+
goto out;
1043+
spin_unlock(&tree->lock);
1044+
if (gfpflags_allow_blocking(mask))
1045+
cond_resched();
1046+
goto again;
10411047

10421048
out:
10431049
spin_unlock(&tree->lock);
@@ -1046,13 +1052,6 @@ __set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
10461052

10471053
return err;
10481054

1049-
search_again:
1050-
if (start > end)
1051-
goto out;
1052-
spin_unlock(&tree->lock);
1053-
if (gfpflags_allow_blocking(mask))
1054-
cond_resched();
1055-
goto again;
10561055
}
10571056

10581057
int set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,

0 commit comments

Comments
 (0)