Commit 03bf5387 authored by David Sterba's avatar David Sterba

btrfs: untangle gotos a bit in convert_extent_bit

Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 7ab5cb2a
...@@ -1262,15 +1262,6 @@ int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, ...@@ -1262,15 +1262,6 @@ int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
goto out; goto out;
} }
goto search_again;
out:
spin_unlock(&tree->lock);
if (prealloc)
free_extent_state(prealloc);
return err;
search_again: search_again:
if (start > end) if (start > end)
goto out; goto out;
...@@ -1279,6 +1270,13 @@ int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, ...@@ -1279,6 +1270,13 @@ int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
cond_resched(); cond_resched();
first_iteration = false; first_iteration = false;
goto again; goto again;
out:
spin_unlock(&tree->lock);
if (prealloc)
free_extent_state(prealloc);
return err;
} }
/* wrappers around set/clear extent bit */ /* wrappers around set/clear extent bit */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment