From: Chris Mason Date: Mon, 26 Nov 2007 15:55:49 +0000 (-0500) Subject: Btrfs: Add check for null block group to find_search_start X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=0e4de58432f552c0ecead965b0fad8a9fb1d31ec;p=openwrt%2Fstaging%2Fblogic.git Btrfs: Add check for null block group to find_search_start Signed-off-by: Chris Mason --- 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: wrapped: cache = btrfs_lookup_block_group(root->fs_info, last); if (!cache) { +no_cache: if (!wrapped) { wrapped = 1; last = search_start; @@ -219,6 +220,8 @@ wrapped: } if (!full_scan) cache = btrfs_find_block_group(root, cache, last, data, 0); + if (!cache) + goto no_cache; *cache_ret = cache; cache_miss = 0; goto again;