Unverified Commit f1e0e312 by Stéphane Graber Committed by GitHub

Merge pull request #3130 from brauner/2019-08-30/cgroup_fixes

cgroup: bugfixes
parents 8ba58490 c18c6b63
......@@ -1795,8 +1795,8 @@ __cgfsng_ops static bool cgfsng_mount(struct cgroup_ops *ops,
else if (type == LXC_AUTO_CGROUP_FULL_NOSPEC)
type = LXC_AUTO_CGROUP_FULL_MIXED;
cgroup_root = must_make_path(root, "/sys/fs/cgroup", NULL);
if (ops->cgroup_layout == CGROUP_LAYOUT_UNIFIED) {
cgroup_root = must_make_path(root, "/sys/fs/cgroup", NULL);
if (has_cgns && wants_force_mount) {
/* If cgroup namespaces are supported but the container
* will not have CAP_SYS_ADMIN after it has started we
......@@ -2003,6 +2003,9 @@ __cgfsng_ops static bool cgfsng_freeze(struct cgroup_ops *ops)
__do_fclose FILE *f = NULL;
struct hierarchy *h;
if (!ops->hierarchies)
return true;
if (ops->cgroup_layout != CGROUP_LAYOUT_UNIFIED) {
h = get_hierarchy(ops, "freezer");
if (!h)
......@@ -2054,6 +2057,9 @@ __cgfsng_ops static bool cgfsng_unfreeze(struct cgroup_ops *ops)
__do_free char *fullpath = NULL;
struct hierarchy *h;
if (!ops->hierarchies)
return true;
if (ops->cgroup_layout != CGROUP_LAYOUT_UNIFIED) {
h = get_hierarchy(ops, "freezer");
if (!h)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment