btrfs: change BUG_ONs to assertions in btrfs_qgroup_trace_subtree()
authorDavid Sterba <dsterba@suse.com>
Tue, 6 Feb 2024 22:06:46 +0000 (23:06 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 4 Mar 2024 15:24:51 +0000 (16:24 +0100)
commit4839c386ced179fb1d6dbe41c31ecdd74c010563
tree542efe0f9631aba69c597cc45483cd77a276f401
parent56f335e043ae73c32dbb70ba95488845dc0f1e6e
btrfs: change BUG_ONs to assertions in btrfs_qgroup_trace_subtree()

The only caller do_walk_down() of btrfs_qgroup_trace_subtree() validates
the value of level and uses it several times before it's passed as an
argument. Same for root_eb that's called 'next' in the caller.

Change both BUG_ONs to assertions as this is to assure proper interface
use rather than real errors.

Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/qgroup.c