btrfs: have proper error handling in btrfs_init_reloc_root
authorJosef Bacik <josef@toxicpanda.com>
Fri, 12 Mar 2021 20:25:13 +0000 (15:25 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Apr 2021 15:25:20 +0000 (17:25 +0200)
commit00bb36a0e76ab7e94bdd70d561baf25f9bc1415d
tree45c396ebd5bf224e4c1ebf10246bde515c5ddf49
parent03a7e111a94961092e2832a6259d39c8c01d6def
btrfs: have proper error handling in btrfs_init_reloc_root

create_reloc_root will return errors in the future, and __add_reloc_root
can return ENOMEM or EEXIST, so handle these errors properly.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ add comment ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/relocation.c