aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-12-13 09:02:46 -0500
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:03:58 -0400
commit70b043f0c7d7c78d8a0a01e65067c7c8fe338485 (patch)
treeb30e96ca08c6d071f0cb9b775eee0e3a6ca45d09
parent3954401fa6013bb2f2c8758b903e9bffcf25b64b (diff)
Btrfs: Extra NULL block group checks in find_free_extent
Signed-off-by: Chris Mason <chris.mason@oracle.com>
-rw-r--r--fs/btrfs/extent-tree.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 187be4012474..7c953b2ecf15 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -1319,6 +1319,12 @@ static int find_free_extent(struct btrfs_trans_handle *trans, struct btrfs_root
1319 total_needed += empty_size; 1319 total_needed += empty_size;
1320 path = btrfs_alloc_path(); 1320 path = btrfs_alloc_path();
1321check_failed: 1321check_failed:
1322 if (!block_group) {
1323 block_group = btrfs_lookup_block_group(info, search_start);
1324 if (!block_group)
1325 block_group = btrfs_lookup_block_group(info,
1326 orig_search_start);
1327 }
1322 search_start = find_search_start(root, &block_group, search_start, 1328 search_start = find_search_start(root, &block_group, search_start,
1323 total_needed, data, full_scan); 1329 total_needed, data, full_scan);
1324 search_start = stripe_align(root, search_start); 1330 search_start = stripe_align(root, search_start);