[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 19/20] qemu-file: Simplify qemu_file_shutdown()
From: |
Juan Quintela |
Subject: |
[PATCH v2 19/20] qemu-file: Simplify qemu_file_shutdown() |
Date: |
Tue, 30 May 2023 20:39:40 +0200 |
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 01616d159c..e4923ab3a0 100644
--- a/migration/qemu-file.c
+++ b/migration/qemu-file.c
@@ -62,8 +62,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
@@ -93,10 +91,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;
}
static QEMUFile *qemu_file_new_impl(QIOChannel *ioc, bool is_writable)
--
2.40.1
- [PATCH v2 06/20] qemu_file: total_transferred is not used anymore, (continued)
- [PATCH v2 06/20] qemu_file: total_transferred is not used anymore, Juan Quintela, 2023/05/30
- [PATCH v2 08/20] qemu_file: Remove unused qemu_file_transferred(), Juan Quintela, 2023/05/30
- [PATCH v2 09/20] qemu-file: Remove _noflush from qemu_file_transferred_noflush(), Juan Quintela, 2023/05/30
- [PATCH v2 10/20] migration: migration_transferred_bytes() don't need the QEMUFile, Juan Quintela, 2023/05/30
- [PATCH v2 11/20] migration: migration_rate_limit_reset() don't need the QEMUFile, Juan Quintela, 2023/05/30
- [PATCH v2 13/20] migration: Use migration_transferred_bytes(), Juan Quintela, 2023/05/30
- [PATCH v2 12/20] qemu-file: Simplify qemu_file_get_error(), Juan Quintela, 2023/05/30
- [PATCH v2 14/20] migration: Remove transferred atomic counter, Juan Quintela, 2023/05/30
- [PATCH v2 15/20] qemu-file: Make qemu_fflush() return errors, Juan Quintela, 2023/05/30
- [PATCH v2 18/20] qemu_file: Make qemu_file_is_writable() static, Juan Quintela, 2023/05/30
- [PATCH v2 19/20] qemu-file: Simplify qemu_file_shutdown(),
Juan Quintela <=
- [PATCH v2 20/20] qemu-file: Make qemu_file_get_error_obj() static, Juan Quintela, 2023/05/30
- [PATCH v2 16/20] migration/rdma: Split qemu_fopen_rdma() into input/output functions, Juan Quintela, 2023/05/30
- [PATCH v2 17/20] qemu-file: Remove unused qemu_file_mode_is_not_valid(), Juan Quintela, 2023/05/30
- Re: [PATCH v2 00/20] Next round of migration atomic counters, Fiona Ebner, 2023/05/31