]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgroups: prevent cgroup mount type overwrite
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 17 Feb 2021 15:23:20 +0000 (16:23 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 17 Feb 2021 15:30:15 +0000 (16:30 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index a4c12d5cffb6e9f9797405607147f104bcefd09c..dbf6b9360656afab03d1ceee400a7668f2187156 100644 (file)
@@ -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;