From: Jincheng Miao Date: Wed, 27 Aug 2014 02:10:33 +0000 (+0800) Subject: qemu: call endjob in RevertToSnapshot X-Git-Tag: v1.2.8-rc1~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03b994fac0434c08cca13f51c3980c1b1d218047;p=thirdparty%2Flibvirt.git 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. https://bugzilla.redhat.com/show_bug.cgi?id=1134154 Bug introduced in commit 1e833899. Signed-off-by: Jincheng Miao Signed-off-by: Eric Blake --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f5b17ba80a..2db507f829 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;