qemu: hotplug: Remove qemuDomainDelDiskSrcTLSObject

Replace access via wrapper by direct call to monitor API.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2018-05-14 12:12:41 +02:00
parent 6e6d84163e
commit 389d966abf

View File

@ -182,15 +182,6 @@ qemuDomainAddDiskSrcTLSObject(virQEMUDriverPtr driver,
} }
static void
qemuDomainDelDiskSrcTLSObject(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virStorageSourcePtr src)
{
qemuDomainDelTLSObjects(driver, vm, QEMU_ASYNC_JOB_NONE, NULL, src->tlsAlias);
}
static int static int
qemuHotplugWaitForTrayEject(virQEMUDriverPtr driver, qemuHotplugWaitForTrayEject(virQEMUDriverPtr driver,
virDomainObjPtr vm, virDomainObjPtr vm,
@ -529,6 +520,8 @@ qemuDomainAttachDiskGeneric(virQEMUDriverPtr driver,
ignore_value(qemuMonitorDelObject(priv->mon, unmanagedPrmgrAlias)); ignore_value(qemuMonitorDelObject(priv->mon, unmanagedPrmgrAlias));
if (managedPrmgrAlias) if (managedPrmgrAlias)
ignore_value(qemuMonitorDelObject(priv->mon, managedPrmgrAlias)); ignore_value(qemuMonitorDelObject(priv->mon, managedPrmgrAlias));
if (disk->src->tlsAlias)
ignore_value(qemuMonitorDelObject(priv->mon, disk->src->tlsAlias));
if (qemuDomainObjExitMonitor(driver, vm) < 0) if (qemuDomainObjExitMonitor(driver, vm) < 0)
ret = -2; ret = -2;
virErrorRestore(&orig_err); virErrorRestore(&orig_err);
@ -536,7 +529,6 @@ qemuDomainAttachDiskGeneric(virQEMUDriverPtr driver,
virDomainAuditDisk(vm, NULL, disk->src, "attach", false); virDomainAuditDisk(vm, NULL, disk->src, "attach", false);
error: error:
qemuDomainDelDiskSrcTLSObject(driver, vm, disk->src);
ignore_value(qemuHotplugPrepareDiskAccess(driver, vm, disk, NULL, true)); ignore_value(qemuHotplugPrepareDiskAccess(driver, vm, disk, NULL, true));
if (priv->prDaemonRunning && if (priv->prDaemonRunning &&
!virDomainDefHasManagedPR(vm->def)) !virDomainDefHasManagedPR(vm->def))