mirror of
https://github.com/torvalds/linux.git
synced 2024-11-29 23:51:37 +00:00
btrfs: change BUG_ON to assertion when verifying root in btrfs_alloc_reserved_file_extent()
The file extents are normally reserved in subvolume roots but could be also in the data reloc tree. Change the BUG_ON to assertions as this verifies the usage assumptions. 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
504a00ac48
commit
3e1d51dd3d
@ -4961,7 +4961,7 @@ int btrfs_alloc_reserved_file_extent(struct btrfs_trans_handle *trans,
|
||||
u64 root_objectid = root->root_key.objectid;
|
||||
u64 owning_root = root_objectid;
|
||||
|
||||
BUG_ON(root_objectid == BTRFS_TREE_LOG_OBJECTID);
|
||||
ASSERT(root_objectid != BTRFS_TREE_LOG_OBJECTID);
|
||||
|
||||
if (btrfs_is_data_reloc_root(root) && is_fstree(root->relocation_src_root))
|
||||
owning_root = root->relocation_src_root;
|
||||
|
Loading…
Reference in New Issue
Block a user