Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
migration: process_incoming_migration_co: simplify code flow around ret
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Message-Id: <20230428194928.1426370-7-vsementsov@yandex-team.ru>
Signed-off-by: Juan Quintela <quintela@redhat.com>
  • Loading branch information
Vladimir Sementsov-Ogievskiy authored and Juan Quintela committed May 9, 2023
1 parent 42884e4 commit cded624
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions migration/migration.c
Expand Up @@ -542,8 +542,13 @@ process_incoming_migration_co(void *opaque)
/* Else if something went wrong then just fall out of the normal exit */
}

if (ret < 0) {
error_report("load of migration failed: %s", strerror(-ret));
goto fail;
}

/* we get COLO info, and know if we are in COLO mode */
if (!ret && migration_incoming_colo_enabled()) {
if (migration_incoming_colo_enabled()) {
QemuThread colo_incoming_thread;

/* Make sure all file formats throw away their mutable metadata */
Expand All @@ -565,10 +570,6 @@ process_incoming_migration_co(void *opaque)
colo_release_ram_cache();
}

if (ret < 0) {
error_report("load of migration failed: %s", strerror(-ret));
goto fail;
}
mis->bh = qemu_bh_new(process_incoming_migration_bh, mis);
qemu_bh_schedule(mis->bh);
mis->migration_incoming_co = NULL;
Expand Down

0 comments on commit cded624

Please sign in to comment.