Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 5d39f44)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
  • Loading branch information
ebblake authored and Michael Tokarev committed May 18, 2023
1 parent cb89826 commit d2a811d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions migration/migration.c
Expand Up @@ -3436,18 +3436,17 @@ 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) {
ret = migration_maybe_pause(s, &current_active_state,
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();
Expand Down

0 comments on commit d2a811d

Please sign in to comment.