cgroup: Introduce family queueing instead of siblings

The unit_add_siblings_to_cgroup_realize_queue does more than mere
siblings queueing, hence define a family of a unit as (immediate)
children of the unit and immediate children of all ancestors.

Working with this abstraction simplifies the queuing calls and it
shouldn't change the functionality.
This commit is contained in:
Michal Koutný
2020-08-19 11:41:53 +02:00
parent f23ba94db3
commit 4c591f3996
3 changed files with 36 additions and 46 deletions
+3 -4
View File
@@ -661,11 +661,10 @@ void unit_free(Unit *u) {
for (UnitDependency d = 0; d < _UNIT_DEPENDENCY_MAX; d++)
bidi_set_free(u, u->dependencies[d]);
/* A unit is being dropped from the tree, make sure our siblings and ancestor slices are realized
* properly. Do this after we detach the unit from slice tree in order to eliminate its effect on
* controller masks. */
/* A unit is being dropped from the tree, make sure our family is realized properly. Do this after we
* detach the unit from slice tree in order to eliminate its effect on controller masks. */
if (UNIT_ISSET(u->slice))
unit_add_siblings_to_cgroup_realize_queue(u);
unit_add_family_to_cgroup_realize_queue(UNIT_DEREF(u->slice));
if (u->on_console)
manager_unref_console(u->manager);