diff mbox series

[PULL,05/16] migration: savevm: fix error code with migration blockers

Message ID 20190514183454.12758-6-dgilbert@redhat.com
State New
Headers show
Series None | expand

Commit Message

Dr. David Alan Gilbert May 14, 2019, 6:34 p.m. UTC
From: Cole Robinson <crobinso@redhat.com>


The only caller that checks the error code is looking for != 0,
so returning false is incorrect.

Fixes: 5aaac467938 "migration: savevm: consult migration blockers"

Signed-off-by: Cole Robinson <crobinso@redhat.com>

Message-Id: <b991a4d0e6c4253bc08b2794c6084be55fc72e1d.1554851834.git.crobinso@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

Reviewed-by: Juan Quintela <quintela@redhat.com>

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

---
 migration/savevm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.21.0
diff mbox series

Patch

diff --git a/migration/savevm.c b/migration/savevm.c
index 587fec8ce2..81a9a2ef30 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -2542,7 +2542,7 @@  int save_snapshot(const char *name, Error **errp)
     AioContext *aio_context;
 
     if (migration_is_blocked(errp)) {
-        return false;
+        return ret;
     }
 
     if (!replay_can_snapshot()) {