Merge pull request #2270 from kolyshkin/systemd-no-kmem

cgroupv2: don't try to set kmem for systemd case
This commit is contained in:
Mrunal Patel 2020-03-25 21:39:52 -07:00 committed by GitHub
commit 96596cbbec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 7 deletions

View File

@ -126,13 +126,7 @@ func (m *UnifiedManager) Apply(pid int) error {
properties = append(properties, c.SystemdProps...)
// We have to set kernel memory here, as we can't change it once
// processes have been attached to the cgroup.
if c.Resources.KernelMemory != 0 {
if err := setKernelMemory(c); err != nil {
return err
}
}
// ignore c.Resources.KernelMemory
statusChan := make(chan string, 1)
if _, err := theConn.StartTransientUnit(unitName, "replace", properties, statusChan); err == nil {