cgroup: in unit_invalidate_cgroup() actually modify invalidation mask
Previously this would manipulate the realization mask for invalidating the realization. This is a bit ugly though as the realization mask's primary purpose to is to reflect in which hierarchies a cgroup currently exists, and it's probably a good idea to keep that in sync with realities. We nowadays have the an explicit fields for invalidating cgroup controller information, the "cgroup_invalidated_mask", let's use this one instead. The effect is pretty much the same, as the main consumer of these masks (unit_has_mask_realize()) checks both anyway.
This commit is contained in:
parent
27adcc9737
commit
e00068e71f
|
@ -2824,10 +2824,10 @@ void unit_invalidate_cgroup(Unit *u, CGroupMask m) {
|
|||
if (m & (CGROUP_MASK_CPU | CGROUP_MASK_CPUACCT))
|
||||
m |= CGROUP_MASK_CPU | CGROUP_MASK_CPUACCT;
|
||||
|
||||
if ((u->cgroup_realized_mask & m) == 0) /* NOP? */
|
||||
if (FLAGS_SET(u->cgroup_invalidated_mask, m)) /* NOP? */
|
||||
return;
|
||||
|
||||
u->cgroup_realized_mask &= ~m;
|
||||
u->cgroup_invalidated_mask |= m;
|
||||
unit_add_to_cgroup_realize_queue(u);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue