migration/multifd: Move multifd_send_setup error handling in to the function

Hide the error handling inside multifd_send_setup to make it cleaner
for the next patch to move the function around.

Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240206215118.6171-4-farosas@suse.de
Signed-off-by: Peter Xu <peterx@redhat.com>
This commit is contained in:
Fabiano Rosas
2024-02-06 18:51:15 -03:00
committed by Peter Xu
parent a2a63c4abd
commit bd8b0a8f82
3 changed files with 19 additions and 13 deletions

View File

@@ -3635,11 +3635,7 @@ void migrate_fd_connect(MigrationState *s, Error *error_in)
return;
}
if (multifd_send_setup(&local_err) != 0) {
migrate_set_error(s, local_err);
error_report_err(local_err);
migrate_set_state(&s->state, MIGRATION_STATUS_SETUP,
MIGRATION_STATUS_FAILED);
if (!multifd_send_setup()) {
migrate_fd_cleanup(s);
return;
}