]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: handle btrfs_record_root_in_trans failure in btrfs_recover_log_trees
authorJosef Bacik <josef@toxicpanda.com>
Fri, 12 Mar 2021 20:25:05 +0000 (15:25 -0500)
committerDavid Sterba <dsterba@suse.com>
Tue, 6 Apr 2021 17:25:36 +0000 (19:25 +0200)
commit3fe37d43035f69a1345757ae5a242e041e38f871
treee49634e8d49ff9fb19dd8a8a9eff712463258fc4
parentd78a30f330881d2890c01a6d799af60ad674c7d0
btrfs: handle btrfs_record_root_in_trans failure in btrfs_recover_log_trees

btrfs_record_root_in_trans will return errors in the future, so handle
the error properly in btrfs_recover_log_trees.

This appears tricky, however we have a reference count on the
destination root, so if this fails we need to continue on in the loop to
make sure the proper cleanup is done.

Reviewed-by: Qu Wenruo <wqu@suse.com>
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/tree-log.c