Skip to content

Commit

Permalink
Btrfs: Add check for null block group to find_search_start
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 7073c8e commit 0e4de58
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ static u64 find_search_start(struct btrfs_root *root,
wrapped:
cache = btrfs_lookup_block_group(root->fs_info, last);
if (!cache) {
no_cache:
if (!wrapped) {
wrapped = 1;
last = search_start;
Expand All @@ -219,6 +220,8 @@ static u64 find_search_start(struct btrfs_root *root,
}
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;
Expand Down

0 comments on commit 0e4de58

Please sign in to comment.