提交 d26f3cde 编写于 作者: P Peter Krempa

qemu: driver: Don't use qemuBlockJobStartupFinalize in processBlockJobEvent

While this function does start a block job in case when we'd not be able
to get our internal data for it, the handler sets the job state to
QEMU_BLOCKJOB_STATE_RUNNING anyways, thus qemuBlockJobStartupFinalize
would just unref the job.

Since the other usage of qemuBlockJobStartupFinalize in the other part
of the event handler was a bug replace this one anyways even if it would
not cause problems.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 00c4c971
......@@ -4686,7 +4686,7 @@ processBlockJobEvent(virQEMUDriverPtr driver,
int status)
{
virDomainDiskDefPtr disk;
qemuBlockJobDataPtr job = NULL;
VIR_AUTOUNREF(qemuBlockJobDataPtr) job = NULL;
if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
return;
......@@ -4712,7 +4712,6 @@ processBlockJobEvent(virQEMUDriverPtr driver,
qemuBlockJobUpdate(vm, job, QEMU_ASYNC_JOB_NONE);
endjob:
qemuBlockJobStartupFinalize(vm, job);
qemuDomainObjEndJob(driver, vm);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册