Skip to content

Commit

Permalink
cgroups: don't strip LXC_AUTO_CGROUP_FORCE
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Feb 15, 2021
1 parent cdd3b77 commit 68599aa
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/lxc/cgroups/cgfsng.c
Expand Up @@ -1889,10 +1889,8 @@ __cgfsng_ops static bool cgfsng_mount(struct cgroup_ops *ops,
if ((cg_flags & LXC_AUTO_CGROUP_MASK) == 0)
return true;

if (cg_flags & LXC_AUTO_CGROUP_FORCE) {
cg_flags &= ~LXC_AUTO_CGROUP_FORCE;
if (cg_flags & LXC_AUTO_CGROUP_FORCE)
wants_force_mount = true;
}

if (!wants_force_mount) {
wants_force_mount = !lxc_wants_cap(CAP_SYS_ADMIN, conf);
Expand Down

0 comments on commit 68599aa

Please sign in to comment.