summaryrefslogtreecommitdiff
path: root/src/core/cgroup.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-09-05 11:17:01 +0200
committerSven Eden <yamakuzure@gmx.net>2017-09-05 11:17:01 +0200
commit99811701c83de137820dd65f3e5ff4c1d2f486e2 (patch)
tree8ef47a4aa3bcc544474bcacb2c8a7330b93a786a /src/core/cgroup.c
parent8d490b33e6e8f70ce7bc2485a02e6a70334f9477 (diff)
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.
Diffstat (limited to 'src/core/cgroup.c')
-rw-r--r--src/core/cgroup.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index 01041d817..48f09658b 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -2225,6 +2225,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;