[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 09/19] migration/rdma: simplify ram_control_load_hook()
From: |
Juan Quintela |
Subject: |
[PATCH 09/19] migration/rdma: simplify ram_control_load_hook() |
Date: |
Thu, 27 Apr 2023 18:34:39 +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 22af45a5db..9b5e14a2ef 100644
--- a/migration/qemu-file.c
+++ b/migration/qemu-file.c
@@ -317,10 +317,8 @@ void qemu_fflush(QEMUFile *f)
void ram_control_load_hook(QEMUFile *f, uint64_t flags, void *data)
{
- int ret = -EINVAL;
-
if (f->hooks && f->hooks->hook_ram_load) {
- ret = f->hooks->hook_ram_load(f, flags, data);
+ int ret = f->hooks->hook_ram_load(f, flags, data);
if (ret < 0) {
qemu_file_set_error(f, ret);
}
@@ -330,7 +328,7 @@ void ram_control_load_hook(QEMUFile *f, uint64_t flags,
void *data)
* that expects there to be a hook on the destination.
*/
if (flags == RAM_CONTROL_HOOK) {
- qemu_file_set_error(f, ret);
+ qemu_file_set_error(f, -EINVAL);
}
}
}
--
2.40.0
- [PATCH 02/19] migration: Move ram_stats to its own file migration-stats.[ch], (continued)
- [PATCH 02/19] migration: Move ram_stats to its own file migration-stats.[ch], Juan Quintela, 2023/04/27
- [PATCH 06/19] migration/rdma: Unfold last user of acct_update_position(), Juan Quintela, 2023/04/27
- [PATCH 07/19] migration/rdma: Unflod ram_control_before_iterate(), Juan Quintela, 2023/04/27
- [PATCH 04/19] migration: Rename RAMStats to MigrationAtomicStats, Juan Quintela, 2023/04/27
- [PATCH 12/19] migration/rdma: It makes no sense to recive that flag without RDMA, Juan Quintela, 2023/04/27
- [PATCH 05/19] migration/rdma: Split the zero page case from acct_update_position, Juan Quintela, 2023/04/27
- [PATCH 09/19] migration/rdma: simplify ram_control_load_hook(),
Juan Quintela <=
- [PATCH 13/19] migration: Make RAM_SAVE_FLAG_HOOK a normal case entry, Juan Quintela, 2023/04/27
- [PATCH 14/19] migration/rdma: Remove all uses of RAM_CONTROL_HOOK, Juan Quintela, 2023/04/27
- [PATCH 17/19] migration/rdma: Create rdma_control_save_page(), Juan Quintela, 2023/04/27
- [PATCH 19/19] migration/rdma: Move rdma constants from qemu-file.h to rdma.h, Juan Quintela, 2023/04/27
- [PATCH 11/19] migration/rdma: We can calculate the rioc from the QEMUFile, Juan Quintela, 2023/04/27
- [PATCH 03/19] migration: Rename ram_counters to mig_stats, Juan Quintela, 2023/04/27
- [PATCH 18/19] qemu-file: Remove QEMUFileHooks, Juan Quintela, 2023/04/27
- [PATCH 16/19] migration/rdma: Make ram_control_save_page() use exported interfaces, Juan Quintela, 2023/04/27
- [PATCH 10/19] migration/rdma: Don't pass the QIOChannelRDMA as an opaque, Juan Quintela, 2023/04/27