From b514d5a89888ba76d3891fa34eb48e6d91128749 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 20 Apr 2023 09:35:51 -0500 Subject: migration: Minor control flow simplification No need to declare a temporary variable. Suggested-by: Juan Quintela Fixes: 1df36e8c6289 ("migration: Handle block device inactivation failures better") Signed-off-by: Eric Blake Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela (cherry picked from commit 5d39f44d7ac5c63f53d4d0900ceba9521bc27e49) Signed-off-by: Michael Tokarev --- migration/migration.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'migration') 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(); -- cgit v1.2.3