[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 28/30] qemu-file: Simplify qemu_file_shutdown()
From: |
Juan Quintela |
Subject: |
[PULL 28/30] qemu-file: Simplify qemu_file_shutdown() |
Date: |
Thu, 22 Jun 2023 18:55:25 +0200 |
Reviewed-by: Peter Xu <peterx@redhat.com>
Message-ID: <20230530183941.7223-20-quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
migration/qemu-file.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/migration/qemu-file.c b/migration/qemu-file.c
index 9a89e17924..4c577bdff8 100644
--- a/migration/qemu-file.c
+++ b/migration/qemu-file.c
@@ -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
@@ -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)
--
2.40.1
- [PULL 14/30] migration-test: machine_opts is really arch specific, (continued)
- [PULL 14/30] migration-test: machine_opts is really arch specific, Juan Quintela, 2023/06/22
- [PULL 13/30] migration-test: Create arch_opts, Juan Quintela, 2023/06/22
- [PULL 18/30] migration-test: dirtylimit checks for x86_64 arch before, Juan Quintela, 2023/06/22
- [PULL 17/30] migration-test: Add bootfile_create/delete() functions, Juan Quintela, 2023/06/22
- [PULL 19/30] migration-test: simplify shmem_opts handling, Juan Quintela, 2023/06/22
- [PULL 21/30] migration: Refactor repeated call of yank_unregister_instance, Juan Quintela, 2023/06/22
- [PULL 15/30] migration-test: Create kvm_opts, Juan Quintela, 2023/06/22
- [PULL 23/30] qtest/migration-tests.c: use "-incoming defer" for postcopy tests, Juan Quintela, 2023/06/22
- [PULL 20/30] migration: Update error description whenever migration fails, Juan Quintela, 2023/06/22
- [PULL 22/30] migration: enforce multifd and postcopy preempt to be set before incoming, Juan Quintela, 2023/06/22
- [PULL 28/30] qemu-file: Simplify qemu_file_shutdown(),
Juan Quintela <=
- [PULL 29/30] qemu-file: Make qemu_file_get_error_obj() static, Juan Quintela, 2023/06/22
- [PULL 25/30] migration: Change qemu_file_transferred to noflush, Juan Quintela, 2023/06/22
- [PULL 30/30] migration/rdma: Split qemu_fopen_rdma() into input/output functions, Juan Quintela, 2023/06/22
- [PULL 27/30] qemu_file: Make qemu_file_is_writable() static, Juan Quintela, 2023/06/22
- [PULL 24/30] qemu-file: Rename qemu_file_transferred_ fast -> noflush, Juan Quintela, 2023/06/22
- [PULL 26/30] migration: Use qemu_file_transferred_noflush() for block migration., Juan Quintela, 2023/06/22
- Re: [PULL 00/30] Next patches, Richard Henderson, 2023/06/23