[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] qemu: call endjob in RevertToSnapshot



In qemuDomainRevertToSnapshot(), it will check snap->def->state.
But when the state is PMSUSPENDED/NOSTATE/BLOCKED, it forgets to
call qemuDomainObjEndJob.

Signed-off-by: Jincheng Miao <jmiao redhat com>
---
 src/qemu/qemu_driver.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index f5b17ba..2db507f 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -14294,7 +14294,7 @@ static int qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
         virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
                        _("qemu doesn't support reversion of snapshot taken in "
                          "PMSUSPENDED state"));
-        goto cleanup;
+        goto endjob;
 
     case VIR_DOMAIN_NOSTATE:
     case VIR_DOMAIN_BLOCKED:
@@ -14303,7 +14303,7 @@ static int qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
                        _("Invalid target domain state '%s'. Refusing "
                          "snapshot reversion"),
                        virDomainStateTypeToString(snap->def->state));
-        goto cleanup;
+        goto endjob;
     }
 
     ret = 0;
-- 
1.7.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]