cgroup: Implicit unit_invalidate_cgroup_members_masks
Merge members mask invalidation into unit_add_siblings_to_cgroup_realize_queue, this way unit_realize_cgroup needn't be called with members mask invalidation. We have to retain the members mask invalidation in unit_load -- although active units would have cgroups (re)realized (unit_load queues for realization), the realization would happen with potentially stale mask.
This commit is contained in:
+1
-3
@@ -664,10 +664,8 @@ void unit_free(Unit *u) {
|
||||
/* 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. */
|
||||
if (UNIT_ISSET(u->slice)) {
|
||||
unit_invalidate_cgroup_members_masks(UNIT_DEREF(u->slice));
|
||||
if (UNIT_ISSET(u->slice))
|
||||
unit_add_siblings_to_cgroup_realize_queue(u);
|
||||
}
|
||||
|
||||
if (u->on_console)
|
||||
manager_unref_console(u->manager);
|
||||
|
||||
Reference in New Issue
Block a user