From: Lennart Poettering Date: Tue, 5 Sep 2017 09:17:01 +0000 (+0200) Subject: cgroup: always invalidate "cpu" and "cpuacct" together X-Git-Tag: v235~60^2~39 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7cce4fb7f703fa928caf10e5b4e235625ee4bf80;p=platform%2Fupstream%2Fsystemd.git cgroup: always invalidate "cpu" and "cpuacct" together This doesn't really matter, as we never invalidate cpuacct explicitly, and there's no real reason to care for it explicitly, however it's prettier if we always treat cpu and cpuacct as belonging together, the same way we conisder "io" and "blkio" to belong together. --- diff --git a/src/core/cgroup.c b/src/core/cgroup.c index c806d6b..9013a08 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -2167,6 +2167,9 @@ void unit_invalidate_cgroup(Unit *u, CGroupMask m) { if (m & (CGROUP_MASK_IO | CGROUP_MASK_BLKIO)) m |= CGROUP_MASK_IO | CGROUP_MASK_BLKIO; + if (m & (CGROUP_MASK_CPU | CGROUP_MASK_CPUACCT)) + m |= CGROUP_MASK_CPU | CGROUP_MASK_CPUACCT; + if ((u->cgroup_realized_mask & m) == 0) return;