]> git.proxmox.com Git - mirror_ubuntu-kernels.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>
Mon, 19 Apr 2021 15:25:20 +0000 (17:25 +0200)
commit2002ae112a7415403896c66971532c2bb8d09ab7
tree4f2f5c13580f5e6592997c95fd106c52d3c20054
parent2731f5186ba8e641515a01a1016b88f09b34777d
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