]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: do proper error handling in merge_reloc_roots
authorJosef Bacik <josef@toxicpanda.com>
Fri, 12 Mar 2021 20:25:33 +0000 (15:25 -0500)
committerDavid Sterba <dsterba@suse.com>
Tue, 6 Apr 2021 19:07:07 +0000 (21:07 +0200)
commitf5d0e2cc3805430c37a87046ad88a7331a14cc88
tree4b0217e53584c1d3b2d52e0df061e7dee5adadf4
parentb70e10501cd4a9371ea2997531232a015cdb1a8d
btrfs: do proper error handling in merge_reloc_roots

We have a BUG_ON() if we get an error back from btrfs_get_fs_root().
This honestly should never fail, as at this point we have a solid
coordination of fs root to reloc root, and these roots will all be in
memory.  But in the name of killing BUG_ON()'s remove these and handle
the error condition properly, ASSERT()'ing for developers.

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