btrfs_record_root_in_trans will return errors in the future, so handle
the error properly in btrfs_delete_subvolume.
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>
                goto out_end_trans;
        }
 
-       btrfs_record_root_in_trans(trans, dest);
+       ret = btrfs_record_root_in_trans(trans, dest);
+       if (ret) {
+               btrfs_abort_transaction(trans, ret);
+               goto out_end_trans;
+       }
 
        memset(&dest->root_item.drop_progress, 0,
                sizeof(dest->root_item.drop_progress));