Skip to content

Commit

Permalink
Btrfs: Extra NULL block group checks in find_free_extent
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Chris Mason committed Sep 25, 2008
1 parent 3954401 commit 70b043f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -1319,6 +1319,12 @@ static int find_free_extent(struct btrfs_trans_handle *trans, struct btrfs_root
total_needed += empty_size;
path = btrfs_alloc_path();
check_failed:
if (!block_group) {
block_group = btrfs_lookup_block_group(info, search_start);
if (!block_group)
block_group = btrfs_lookup_block_group(info,
orig_search_start);
}
search_start = find_search_start(root, &block_group, search_start,
total_needed, data, full_scan);
search_start = stripe_align(root, search_start);
Expand Down

0 comments on commit 70b043f

Please sign in to comment.