btrfs: convert BUG_ON()'s in relocate_tree_block
authorJosef Bacik <josef@toxicpanda.com>
Fri, 12 Mar 2021 20:24:57 +0000 (15:24 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Apr 2021 15:25:19 +0000 (17:25 +0200)
commit1c7bfa159fe796f0f6d310b02215d765f066b9c2
tree58f497b2494a9caa455de014e2d71d122069224c
parentffe30dd892ad37f1193ae639ce7e2ad142a62721
btrfs: convert BUG_ON()'s in relocate_tree_block

We have a couple of BUG_ON()'s in relocate_tree_block() that can be
tripped if we have file system corruption.  Convert these to ASSERT()'s
so developers still get yelled at when they break the backref code, but
error out nicely for users so the whole box doesn't go down.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/relocation.c