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

index 1300e24a3ea79e3465ae5a5bee7c2f1a1579f12f..a5d6c01895bfc2b62574c715476a84c9e3c68d45 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