diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 68f88cd407ae94119401aa647e5b89705ebb0ecd..3397fb685f551c895bf950c22a754aa5ac04cce1 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -2507,7 +2507,6 @@ endjob: cleanup: if (vm) virDomainObjUnlock(vm); - qemuDriverUnlock(driver); return ret; } @@ -6583,6 +6582,7 @@ qemuDomainModifyDeviceFlags(virDomainPtr dom, const char *xml, qemuDriverLock(driver); vm = virDomainFindByUUID(&driver->domains, dom->uuid); + qemuDriverUnlock(driver); if (!vm) { char uuidstr[VIR_UUID_STRING_BUFLEN]; virUUIDFormat(dom->uuid, uuidstr); @@ -12688,6 +12688,7 @@ static int qemuDomainMonitorCommand(virDomainPtr domain, const char *cmd, qemuDriverLock(driver); vm = virDomainFindByUUID(&driver->domains, domain->uuid); + qemuDriverUnlock(driver); if (!vm) { char uuidstr[VIR_UUID_STRING_BUFLEN]; virUUIDFormat(domain->uuid, uuidstr); @@ -12700,9 +12701,9 @@ static int qemuDomainMonitorCommand(virDomainPtr domain, const char *cmd, virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("domain is not running")); goto cleanup; - } + } - if (qemuDomainObjBeginJobWithDriver(driver, vm, QEMU_JOB_MODIFY) < 0) + if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0) goto cleanup; if (!virDomainObjIsActive(vm)) { @@ -12717,9 +12718,9 @@ static int qemuDomainMonitorCommand(virDomainPtr domain, const char *cmd, hmp = !!(flags & VIR_DOMAIN_QEMU_MONITOR_COMMAND_HMP); - qemuDomainObjEnterMonitorWithDriver(driver, vm); + qemuDomainObjEnterMonitor(driver, vm); ret = qemuMonitorArbitraryCommand(priv->mon, cmd, result, hmp); - qemuDomainObjExitMonitorWithDriver(driver, vm); + qemuDomainObjExitMonitor(driver, vm); endjob: if (qemuDomainObjEndJob(driver, vm) == 0) { @@ -12729,7 +12730,6 @@ endjob: cleanup: if (vm) virDomainObjUnlock(vm); - qemuDriverUnlock(driver); return ret; }