Skip to content

Commit

Permalink
migration: inline migrate_fd_close
Browse files Browse the repository at this point in the history
Reviewed-by: Orit Wasserman <[email protected]>
Reviewed-by: Juan Quintela <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
  • Loading branch information
bonzini authored and Juan Quintela committed Mar 11, 2013
1 parent b352365 commit 6f190a0
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions migration.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,10 @@ static void migrate_fd_cleanup(void *opaque)
qemu_thread_join(&s->thread);
qemu_mutex_lock_iothread();

migrate_fd_close(s);
qemu_fclose(s->file);
s->file = NULL;
}

assert(s->file == NULL);
assert(s->state != MIG_STATE_ACTIVE);

if (s->state != MIG_STATE_COMPLETED) {
Expand Down Expand Up @@ -311,16 +311,6 @@ static void migrate_fd_cancel(MigrationState *s)
migrate_finish_set_state(s, MIG_STATE_CANCELLED);
}

int migrate_fd_close(MigrationState *s)
{
int rc = 0;
if (s->file != NULL) {
rc = qemu_fclose(s->file);
s->file = NULL;
}
return rc;
}

void add_migration_state_change_notifier(Notifier *notify)
{
notifier_list_add(&migration_state_notifiers, notify);
Expand Down

0 comments on commit 6f190a0

Please sign in to comment.