mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 03:21:19 +00:00
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:
parent
382071b8bf
commit
b43acd8e82
@ -268,10 +268,6 @@ qemuDBusStart(virQEMUDriverPtr driver,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priv->cgroup &&
|
|
||||||
virCgroupAddProcess(priv->cgroup, cpid) < 0)
|
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
if (qemuSecurityDomainSetPathLabel(driver, vm, sockpath, false) < 0)
|
if (qemuSecurityDomainSetPathLabel(driver, vm, sockpath, false) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -251,7 +251,6 @@ qemuSlirpStart(qemuSlirpPtr slirp,
|
|||||||
virDomainNetDefPtr net,
|
virDomainNetDefPtr net,
|
||||||
bool incoming)
|
bool incoming)
|
||||||
{
|
{
|
||||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
|
||||||
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
|
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
|
||||||
g_autoptr(virCommand) cmd = NULL;
|
g_autoptr(virCommand) cmd = NULL;
|
||||||
g_autofree char *pidfile = NULL;
|
g_autofree char *pidfile = NULL;
|
||||||
@ -356,9 +355,6 @@ qemuSlirpStart(qemuSlirpPtr slirp,
|
|||||||
|
|
||||||
slirp->pid = pid;
|
slirp->pid = pid;
|
||||||
|
|
||||||
if (priv->cgroup && qemuSlirpSetupCgroup(slirp, priv->cgroup) < 0)
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
Loading…
Reference in New Issue
Block a user