mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 00:52:01 +00:00
btrfs: change BUG_ON to assertion in btrfs_read_roots()
There's one caller of btrfs_read_roots() and that already uses the tree_root pointer, it's pointless to BUG_ON on it. As it's an assumption of the initialization helpers make it an assert instead. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
51d4be5400
commit
2467d0fead
@ -2239,7 +2239,7 @@ static int btrfs_read_roots(struct btrfs_fs_info *fs_info)
|
||||
struct btrfs_key location;
|
||||
int ret;
|
||||
|
||||
BUG_ON(!fs_info->tree_root);
|
||||
ASSERT(fs_info->tree_root);
|
||||
|
||||
ret = load_global_roots(tree_root);
|
||||
if (ret)
|
||||
|
Loading…
Reference in New Issue
Block a user