]> git.ipfire.org Git - thirdparty/lxc.git/commit
cgfsng: only establish mapping once 2067/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 4 Jan 2018 14:28:12 +0000 (15:28 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 4 Jan 2018 14:28:12 +0000 (15:28 +0100)
commitbd8ef4e4da956e0eba0cced93036a4edec20f8f6
tree21e878c123217f96bb285d34baf6ba34f4ac3268
parentdcf0ffdf41990872151f8d33a9a81a93bbeb9d24
cgfsng: only establish mapping once

When we deleted cgroups for unprivileged containers we used to allocate a new
mapping and clone a new user namespace each time we delete a cgroup. This of
course meant - on a cgroup v1 system - doing this >= 10 times when all
controllers were used. Let's not to do this and only allocate and establish a
mapping once.

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