mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +00:00
qemu: migration: Simplify cleanup in qemuMigrationSrcNBDCopyCancelOne
Now that the cleanup section does not exist remove the label. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
37e801340a
commit
e1910a1f3b
@ -649,7 +649,6 @@ qemuMigrationSrcNBDCopyCancelOne(virQEMUDriverPtr driver,
|
||||
qemuDomainAsyncJob asyncJob)
|
||||
{
|
||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||
int ret = -1;
|
||||
int status;
|
||||
int rv;
|
||||
|
||||
@ -659,26 +658,22 @@ qemuMigrationSrcNBDCopyCancelOne(virQEMUDriverPtr driver,
|
||||
case VIR_DOMAIN_BLOCK_JOB_CANCELED:
|
||||
if (failNoJob) {
|
||||
qemuMigrationNBDReportMirrorError(job, disk->dst);
|
||||
goto cleanup;
|
||||
return -1;
|
||||
}
|
||||
G_GNUC_FALLTHROUGH;
|
||||
case VIR_DOMAIN_BLOCK_JOB_COMPLETED:
|
||||
ret = 1;
|
||||
goto cleanup;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
|
||||
goto cleanup;
|
||||
return -1;
|
||||
|
||||
rv = qemuMonitorBlockJobCancel(priv->mon, job->name);
|
||||
|
||||
if (qemuDomainObjExitMonitor(driver, vm) < 0 || rv < 0)
|
||||
goto cleanup;
|
||||
return -1;
|
||||
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user