qemu: remove dead code that setup cgroups for helper processes

In both cases priv->cgroup will always be NULL because it is called
before the QEMU process is started and cgroups are configured.

In qemuProcessLaunch() the call order is following:

    qemuExtDevicesStart()
    ...
    virCommandRun()
    ...
    qemuSetupCgroup()

where qemuDBusStart() is called from qemuExtDevicesStart() but we
cgroups are created in qemuSetupCgroup().

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Pavel Hrdina 2020-10-28 03:13:04 +01:00
parent 382071b8bf
commit b43acd8e82
2 changed files with 0 additions and 8 deletions

View File

@ -268,10 +268,6 @@ qemuDBusStart(virQEMUDriverPtr driver,
goto cleanup;
}
if (priv->cgroup &&
virCgroupAddProcess(priv->cgroup, cpid) < 0)
goto cleanup;
if (qemuSecurityDomainSetPathLabel(driver, vm, sockpath, false) < 0)
goto cleanup;

View File

@ -251,7 +251,6 @@ qemuSlirpStart(qemuSlirpPtr slirp,
virDomainNetDefPtr net,
bool incoming)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
g_autoptr(virCommand) cmd = NULL;
g_autofree char *pidfile = NULL;
@ -356,9 +355,6 @@ qemuSlirpStart(qemuSlirpPtr slirp,
slirp->pid = pid;
if (priv->cgroup && qemuSlirpSetupCgroup(slirp, priv->cgroup) < 0)
goto error;
return 0;
error: