]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgroups: don't move pivot cgroup under the monitor's cgroup
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 17 Feb 2021 09:08:27 +0000 (10:08 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 17 Feb 2021 09:08:27 +0000 (10:08 +0100)
Otherwise we will never be able to destroy the monitor's cgroup.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index ddec3ad82b06cead25e04f5ce7d342a40ac2029e..4323c79f39b6da3f313960e2773b1ffab6e4e8c2 100644 (file)
@@ -1249,8 +1249,6 @@ __cgfsng_ops static void cgfsng_monitor_destroy(struct cgroup_ops *ops,
 
                if (conf->cgroup_meta.monitor_pivot_dir)
                        pivot_path = must_make_path(conf->cgroup_meta.monitor_pivot_dir, CGROUP_PIVOT, NULL);
-               else if (conf->cgroup_meta.monitor_dir)
-                       pivot_path = must_make_path(conf->cgroup_meta.monitor_dir, CGROUP_PIVOT, NULL);
                else if (conf->cgroup_meta.dir)
                        pivot_path = must_make_path(conf->cgroup_meta.dir, CGROUP_PIVOT, NULL);
                else