summary refs log tree commit diff stats
path: root/migration/ram.c
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2021-09-29 16:43:10 +0200
committerJuan Quintela <quintela@trasno.org>2021-11-03 09:38:53 +0100
commit458fecca80963b4c2c2164889d817542d2cece4f (patch)
tree0160e8b19e85842063eeb930216d516cecd08560 /migration/ram.c
parent741bdeb1d5a4024a2c54c6abb2de493a27b61953 (diff)
downloadfocaccia-qemu-458fecca80963b4c2c2164889d817542d2cece4f.tar.gz
focaccia-qemu-458fecca80963b4c2c2164889d817542d2cece4f.zip
migration: provide an error message to migration_cancel()
This avoids to call migrate_get_current() in the caller function
whereas migration_cancel() already needs the pointer to the current
migration state.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration/ram.c')
-rw-r--r--migration/ram.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/migration/ram.c b/migration/ram.c
index 680a5158aa..f5d39db4e4 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -4323,9 +4323,8 @@ static void ram_mig_ram_block_resized(RAMBlockNotifier *n, void *host,
          * Abort and indicate a proper reason.
          */
         error_setg(&err, "RAM block '%s' resized during precopy.", rb->idstr);
-        migrate_set_error(migrate_get_current(), err);
+        migration_cancel(err);
         error_free(err);
-        migration_cancel();
     }
 
     switch (ps) {