diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-02-22 19:55:31 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-02-22 19:58:06 -0500 |
commit | c19739db9ec705b4afdad32301e8750b5e02c7d3 (patch) | |
tree | a2c3c8aa9c20f855b8be49e63f4c61e93aa2db63 /src/basic | |
parent | 239a3d09547a32c21e9b9b22499991781c15438e (diff) |
cgroup-util: fix the case of default=unified, unified-cgroup-hierarchy=0
We should mount the hybrid hierarchy if the user disabled the unified
hierarchy on the kernel command line.
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/cgroup-util.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c index 3222428649..f76b7f47e5 100644 --- a/src/basic/cgroup-util.c +++ b/src/basic/cgroup-util.c @@ -2447,7 +2447,10 @@ bool cg_is_hybrid_wanted(void) { static thread_local int wanted = -1; int r; bool b; - const bool is_default = DEFAULT_HIERARCHY == CGROUP_UNIFIED_SYSTEMD; + const bool is_default = DEFAULT_HIERARCHY >= CGROUP_UNIFIED_SYSTEMD; + /* We default to true if the default is "hybrid", obviously, + * but also when the default is "unified", because if we get + * called, it means that unified hierarchy was not mounted. */ /* If we have a cached value, return that. */ if (wanted >= 0) |