aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-11-26 10:55:49 -0500
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:03:58 -0400
commit0e4de58432f552c0ecead965b0fad8a9fb1d31ec (patch)
tree882ca940b11bc4303cfccb05e0dc3dc92f375de7 /fs/btrfs/extent-tree.c
parent7073c8e852946274e4d50fdf072438612f9dc845 (diff)
Btrfs: Add check for null block group to find_search_start
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r--fs/btrfs/extent-tree.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 6a7a9ba75fd9..39be6baccc36 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -204,6 +204,7 @@ new_group:
204wrapped: 204wrapped:
205 cache = btrfs_lookup_block_group(root->fs_info, last); 205 cache = btrfs_lookup_block_group(root->fs_info, last);
206 if (!cache) { 206 if (!cache) {
207no_cache:
207 if (!wrapped) { 208 if (!wrapped) {
208 wrapped = 1; 209 wrapped = 1;
209 last = search_start; 210 last = search_start;
@@ -219,6 +220,8 @@ wrapped:
219 } 220 }
220 if (!full_scan) 221 if (!full_scan)
221 cache = btrfs_find_block_group(root, cache, last, data, 0); 222 cache = btrfs_find_block_group(root, cache, last, data, 0);
223 if (!cache)
224 goto no_cache;
222 *cache_ret = cache; 225 *cache_ret = cache;
223 cache_miss = 0; 226 cache_miss = 0;
224 goto again; 227 goto again;