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

qemu: migration: Simplify cleanup in qemuMigrationSrcNBDCopyCancelOne

Now that the cleanup section does not exist remove the label.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
上级 37e80134
...@@ -649,7 +649,6 @@ qemuMigrationSrcNBDCopyCancelOne(virQEMUDriverPtr driver, ...@@ -649,7 +649,6 @@ qemuMigrationSrcNBDCopyCancelOne(virQEMUDriverPtr driver,
qemuDomainAsyncJob asyncJob) qemuDomainAsyncJob asyncJob)
{ {
qemuDomainObjPrivatePtr priv = vm->privateData; qemuDomainObjPrivatePtr priv = vm->privateData;
int ret = -1;
int status; int status;
int rv; int rv;
...@@ -659,26 +658,22 @@ qemuMigrationSrcNBDCopyCancelOne(virQEMUDriverPtr driver, ...@@ -659,26 +658,22 @@ qemuMigrationSrcNBDCopyCancelOne(virQEMUDriverPtr driver,
case VIR_DOMAIN_BLOCK_JOB_CANCELED: case VIR_DOMAIN_BLOCK_JOB_CANCELED:
if (failNoJob) { if (failNoJob) {
qemuMigrationNBDReportMirrorError(job, disk->dst); qemuMigrationNBDReportMirrorError(job, disk->dst);
goto cleanup; return -1;
} }
G_GNUC_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_DOMAIN_BLOCK_JOB_COMPLETED: case VIR_DOMAIN_BLOCK_JOB_COMPLETED:
ret = 1; return 1;
goto cleanup;
} }
if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0) if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
goto cleanup; return -1;
rv = qemuMonitorBlockJobCancel(priv->mon, job->name); rv = qemuMonitorBlockJobCancel(priv->mon, job->name);
if (qemuDomainObjExitMonitor(driver, vm) < 0 || rv < 0) if (qemuDomainObjExitMonitor(driver, vm) < 0 || rv < 0)
goto cleanup; return -1;
ret = 0;
cleanup: return 0;
return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册