diff options
author | Eric Blake <eblake@redhat.com> | 2023-04-20 09:35:51 -0500 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2023-05-18 21:09:59 +0300 |
commit | b514d5a89888ba76d3891fa34eb48e6d91128749 (patch) | |
tree | 80428a24aeb2043cfdd6a0947fce4c064f0474ee /migration | |
parent | 08fd84005f8f40c1af22c72294b8f69b0069d089 (diff) |
migration: Minor control flow simplification
No need to declare a temporary variable.
Suggested-by: Juan Quintela <quintela@redhat.com>
Fixes: 1df36e8c6289 ("migration: Handle block device inactivation failures better")
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
(cherry picked from commit 5d39f44d7ac5c63f53d4d0900ceba9521bc27e49)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'migration')
-rw-r--r-- | migration/migration.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/migration/migration.c b/migration/migration.c index 043d22e049..2c92ad9014 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -3320,7 +3320,6 @@ static void migration_completion(MigrationState *s) ret = global_state_store(); if (!ret) { - bool inactivate = !migrate_colo_enabled(); ret = vm_stop_force_state(RUN_STATE_FINISH_MIGRATE); trace_migration_completion_vm_stop(ret); if (ret >= 0) { @@ -3328,10 +3327,10 @@ static void migration_completion(MigrationState *s) MIGRATION_STATUS_DEVICE); } if (ret >= 0) { - s->block_inactive = inactivate; + s->block_inactive = !migrate_colo_enabled(); qemu_file_set_rate_limit(s->to_dst_file, INT64_MAX); ret = qemu_savevm_state_complete_precopy(s->to_dst_file, false, - inactivate); + s->block_inactive); } } qemu_mutex_unlock_iothread(); |