btrfs: change BUG_ON to assertion when verifying root in btrfs_alloc_reserved_file_ex...
authorDavid Sterba <dsterba@suse.com>
Wed, 24 Jan 2024 15:18:11 +0000 (16:18 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 4 Mar 2024 15:24:48 +0000 (16:24 +0100)
commit3e1d51dd3dc0e93e34b0c0200cc054dff55b9514
tree153d737155963f286b8d4bd0ee52c57c37d3f19c
parent504a00ac48a714845e4ae0593b4ab715f93ac297
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>
fs/btrfs/extent-tree.c