]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgroups: initialize cgroup root directory - encore
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 29 Aug 2019 12:05:17 +0000 (14:05 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 2 Dec 2019 12:59:31 +0000 (13:59 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index 59098ca3fb4e88adf30f20c2cfee6df0ba859a1c..7921926d4f577f708a5593a29857cff1689b9cd1 100644 (file)
@@ -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