diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-11-26 15:55:49 (GMT) |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 15:03:58 (GMT) |
commit | 0e4de58432f552c0ecead965b0fad8a9fb1d31ec (patch) | |
tree | 882ca940b11bc4303cfccb05e0dc3dc92f375de7 /fs | |
parent | 7073c8e852946274e4d50fdf072438612f9dc845 (diff) | |
download | linux-fsl-qoriq-0e4de58432f552c0ecead965b0fad8a9fb1d31ec.tar.xz |
Btrfs: Add check for null block group to find_search_start
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/extent-tree.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 6a7a9ba..39be6ba 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; |