mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 02:09:42 +00:00
Btrfs: Add check for null block group to find_search_start
Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
7073c8e852
commit
0e4de58432
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue