From 2c4348bd1c3b4ce2c44d255a41b2ad9da6b3c62c Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Wed, 17 Feb 2021 18:49:20 +0100 Subject: [PATCH] cgroups: don't overwrite type Signed-off-by: Christian Brauner --- src/lxc/cgroups/cgfsng.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index 501d71a9f..bf8d4d67a 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -2016,18 +2016,8 @@ __cgfsng_ops static bool cgfsng_mount(struct cgroup_ops *ops, wants_force_mount = true; } - if (cgns_supported() && container_uses_namespace(handler, CLONE_NEWCGROUP)) { + if (cgns_supported() && container_uses_namespace(handler, CLONE_NEWCGROUP)) in_cgroup_ns = true; - /* - * When cgroup namespaces are supported and used by the - * container the LXC_AUTO_CGROUP_MIXED and - * LXC_AUTO_CGROUP_FULL_MIXED auto mount options don't apply - * since the parent directory of the container's cgroup is not - * accessible to the container. - */ - cgroup_automount_type &= ~LXC_AUTO_CGROUP_MIXED; - cgroup_automount_type &= ~LXC_AUTO_CGROUP_FULL_MIXED; - } if (in_cgroup_ns && !wants_force_mount) return log_trace(true, "Mounting cgroups not requested or needed"); -- 2.47.2