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: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2019-07-18 18:14:44 +02:00
parent 00c4c971fd
commit d26f3cdedd

View File

@ -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);
}