]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
api.c: add support for empty cgroup v2 deletion
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Thu, 31 Mar 2022 12:21:55 +0000 (17:51 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Fri, 1 Apr 2022 14:49:02 +0000 (08:49 -0600)
commitca55c929e8074e630f3fd2eded96542b88ef1ad5
treefc64fe27b8ad09df28020ded985ac447d3be0a93
parent66485b72950d704a317b13a5db1a876ff6967ce1
api.c: add support for empty cgroup v2 deletion

Add support to recognize empty cgroup v2 with no controllers attached to
it in cgroup_delete_cgroup_ext(), that gets called to remove a cgroup.

In the deletion path, cgroup_build_tasks_procs_path() builds the path
of the cgroup for re-assignment/movement of tasks from the cgroup that's
getting deleted, teach it to recognize the empty controller as cgroup
V2.

Fixes: https://github.com/libcgroup/libcgroup/issues/125
Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
TJH: Fix a couple small typos in commit message
src/api.c