summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Denemark <jdenemar@redhat.com>2013-09-18 10:37:48 +0200
committerJiri Denemark <jdenemar@redhat.com>2013-09-18 10:37:48 +0200
commit13e9bad55ad3d4705585bd483765805973d9f2f1 (patch)
treed28ad55579203123f3e9ae0d7b254e050cdd8abc
parentffb7ccaa7059aed3a2dfdf5630a4b1aa321d2551 (diff)
downloadlibvirt-13e9bad55ad3d4705585bd483765805973d9f2f1.tar.gz
qemu: Avoid dangling job in qemuDomainSetBlockIoTune
virDomainSetBlockIoTuneEnsureACL was incorrectly called after we already started a job. As a result of this, the job was not cleaned up when an access driver had forbidden the action.
-rw-r--r--src/qemu/qemu_driver.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 0763f9b6d5..8a302d1ddc 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -14673,15 +14673,15 @@ qemuDomainSetBlockIoTune(virDomainPtr dom,
if (!(vm = qemuDomObjFromDomain(dom)))
return -1;
+ if (virDomainSetBlockIoTuneEnsureACL(dom->conn, vm->def, flags) < 0)
+ goto cleanup;
+
if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
goto cleanup;
priv = vm->privateData;
cfg = virQEMUDriverGetConfig(driver);
- if (virDomainSetBlockIoTuneEnsureACL(dom->conn, vm->def, flags) < 0)
- goto cleanup;
-
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto endjob;