diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-05-22 07:50:03 +0900 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-05-22 07:50:03 +0900 |
commit | 637f421e5c6ae76f5c59c3badd809bf5f04fca80 (patch) | |
tree | 34980c35bf81ddb9a21b57d6954dc2ed17c39366 /src/core | |
parent | db785129c9bce9294a118484cbc9bb6935ca34c2 (diff) |
cgroups: always propagate controller membership to siblings, for all controllers
This is the behaviour the kernel cgroup rework exposes for all
controllers, hence let's do this already now for all cases.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/cgroup.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c index 34905892ba..36e9f53db8 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -541,18 +541,12 @@ CGroupControllerMask unit_get_members_mask(Unit *u) { } CGroupControllerMask unit_get_siblings_mask(Unit *u) { - CGroupControllerMask m; - assert(u); if (UNIT_ISSET(u->slice)) - m = unit_get_members_mask(UNIT_DEREF(u->slice)); - else - m = unit_get_cgroup_mask(u) | unit_get_members_mask(u); + return unit_get_members_mask(UNIT_DEREF(u->slice)); - /* Sibling propagation is only relevant for weight-based - * controllers, so let's mask out everything else */ - return m & (CGROUP_CPU|CGROUP_BLKIO|CGROUP_CPUACCT); + return unit_get_cgroup_mask(u) | unit_get_members_mask(u); } CGroupControllerMask unit_get_target_mask(Unit *u) { |