aboutsummaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>2023-04-28 22:49:24 +0300
committerJuan Quintela <quintela@redhat.com>2023-05-10 18:48:11 +0200
commitecbfec6d7769b5362feac92404d564622198bf85 (patch)
tree47cd4fd9c17e0f537609b78ede6155bf876abb08 /migration
parent1d4cfcd4091bc6567ba759881f98726c808f7490 (diff)
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>
Diffstat (limited to 'migration')
-rw-r--r--migration/migration.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/migration/migration.c b/migration/migration.c
index c7f628caa6..140b2a4de6 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -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 */
@@ -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;