提交 93841cb0 编写于 作者: M Michal Privoznik

qemu: Acquire domain job in qemuDomainGetFSInfo and qemuDomainGetGuestInfo

These two functions work with vm->def in their critical sections
(i.e. after the job was acquired and before it is released). But
that means, they need QUERY domain job too to prevent vm->def
change.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 e7eae788
......@@ -22143,7 +22143,9 @@ qemuDomainGetFSInfo(virDomainPtr dom,
if (virDomainGetFSInfoEnsureACL(dom->conn, vm->def) < 0)
goto cleanup;
if (qemuDomainObjBeginAgentJob(driver, vm, QEMU_AGENT_JOB_QUERY) < 0)
if (qemuDomainObjBeginJobWithAgent(driver, vm,
QEMU_JOB_QUERY,
QEMU_AGENT_JOB_QUERY) < 0)
goto cleanup;
if (virDomainObjCheckActive(vm) < 0)
......@@ -22163,7 +22165,7 @@ qemuDomainGetFSInfo(virDomainPtr dom,
qemuDomainObjExitAgent(vm, agent);
endjob:
qemuDomainObjEndAgentJob(vm);
qemuDomainObjEndJobWithAgent(driver, vm);
cleanup:
virDomainObjEndAPI(&vm);
......@@ -23241,7 +23243,9 @@ qemuDomainGetGuestInfo(virDomainPtr dom,
if (virDomainGetGuestInfoEnsureACL(dom->conn, vm->def) < 0)
goto cleanup;
if (qemuDomainObjBeginAgentJob(driver, vm, QEMU_AGENT_JOB_QUERY) < 0)
if (qemuDomainObjBeginJobWithAgent(driver, vm,
QEMU_JOB_QUERY,
QEMU_AGENT_JOB_QUERY) < 0)
goto cleanup;
if (!qemuDomainAgentAvailable(vm, true))
......@@ -23291,7 +23295,7 @@ qemuDomainGetGuestInfo(virDomainPtr dom,
qemuDomainObjExitAgent(vm, agent);
endjob:
qemuDomainObjEndAgentJob(vm);
qemuDomainObjEndJobWithAgent(driver, vm);
cleanup:
virDomainObjEndAPI(&vm);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册