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.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2017-02-22 19:55:31 -05:00
parent 239a3d0954
commit c19739db9e
1 changed files with 4 additions and 1 deletions

View File

@ -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)