Skip to content
Commit 2552d17e authored by Josef Bacik's avatar Josef Bacik Committed by Chris Mason
Browse files

Btrfs: clean up find_free_extent



I've replaced the strange looping constructs with a list_for_each_entry on
space_info->block_groups.  If we have a hint we just jump into the loop with
the block group and start looking for space.  If we don't find anything we
start at the beginning and start looking.  We never come out of the loop with a
ref on the block_group _unless_ we found space to use, then we drop it after we
set the trans block_group.

Signed-off-by: default avatarJosef Bacik <jbacik@redhat.com>
parent 70cb0743
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment