From: Christian Brauner Date: Wed, 17 Feb 2021 15:23:20 +0000 (+0100) Subject: cgroups: prevent cgroup mount type overwrite X-Git-Tag: lxc-5.0.0~280^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8186eb8e8a09d4d1c6b4902286a54cfcb1fb3edd;p=thirdparty%2Flxc.git cgroups: prevent cgroup mount type overwrite Signed-off-by: Christian Brauner --- diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index a4c12d5cf..dbf6b9360 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -1987,15 +1987,6 @@ __cgfsng_ops static bool cgfsng_mount(struct cgroup_ops *ops, if (in_cgroup_ns && !wants_force_mount) return log_trace(true, "Mounting cgroups not requested or needed"); - /* - * Fallback to a mixed layout when the user did not specify what cgroup - * layout they want. - */ - if ((cg_flags & LXC_AUTO_CGROUP_NOSPEC)) - cg_flags = LXC_AUTO_CGROUP_MIXED; - else if (cg_flags & LXC_AUTO_CGROUP_FULL_NOSPEC) - cg_flags = LXC_AUTO_CGROUP_FULL_MIXED; - /* This is really the codepath that we want. */ if (pure_unified_layout(ops)) { __do_close int dfd_mnt_unified = -EBADF;