We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 412d4f1 commit df8b44aCopy full SHA for df8b44a
disk-io.c
@@ -438,13 +438,15 @@ static int find_and_setup_root(struct btrfs_root *tree_root,
438
root, fs_info, objectid);
439
ret = btrfs_find_last_root(tree_root, objectid,
440
&root->root_item, &root->root_key);
441
- BUG_ON(ret);
+ if (ret)
442
+ return ret;
443
444
blocksize = btrfs_level_size(root, btrfs_root_level(&root->root_item));
445
generation = btrfs_root_generation(&root->root_item);
446
root->node = read_tree_block(root, btrfs_root_bytenr(&root->root_item),
447
blocksize, generation);
- BUG_ON(!root->node);
448
+ if (!root->node)
449
+ return -ENOENT;
450
return 0;
451
}
452
0 commit comments