Skip to content

Commit

Permalink
qemu-file: Simplify qemu_file_shutdown()
Browse files Browse the repository at this point in the history
Reviewed-by: Peter Xu <peterx@redhat.com>
Message-ID: <20230530183941.7223-20-quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
  • Loading branch information
Juan Quintela committed Jul 26, 2023
1 parent 9ccf83f commit 8c5ee0b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions migration/qemu-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ struct QEMUFile {
*/
int qemu_file_shutdown(QEMUFile *f)
{
int ret = 0;

/*
* We must set qemufile error before the real shutdown(), otherwise
* there can be a race window where we thought IO all went though
Expand Down Expand Up @@ -96,10 +94,10 @@ int qemu_file_shutdown(QEMUFile *f)
}

if (qio_channel_shutdown(f->ioc, QIO_CHANNEL_SHUTDOWN_BOTH, NULL) < 0) {
ret = -EIO;
return -EIO;
}

return ret;
return 0;
}

bool qemu_file_mode_is_not_valid(const char *mode)
Expand Down

0 comments on commit 8c5ee0b

Please sign in to comment.