chiark / gitweb /
core: make unit_has_mask_realized() consider controller enable state
authorTejun Heo <htejun@fb.com>
Sat, 30 Apr 2016 20:12:54 +0000 (16:12 -0400)
committerSven Eden <yamakuzure@gmx.net>
Fri, 16 Jun 2017 08:12:58 +0000 (10:12 +0200)
commitbfd22ee3909a67c139aa2fd9b9a4cecba3dd124d
treea606f1a409aec5ab829ccc5efa0fb25ec5209e93
parentad81cbe3f0c0c9f1e0d3c71210778e4005fe0259
core: make unit_has_mask_realized() consider controller enable state

unit_has_mask_realized() determines whether the specified unit has its cgroups
set up properly given the desired target_mask; however, on the unified
hierarchy, controllers need to be enabled explicitly for children and the mask
of enabled controllers can deviate from target_mask.  Only considering
target_mask in unit_has_mask_realized() can lead to false positives and
skipping enabling the requested controllers.

This patch adds unit->cgroup_enabled_mask to track which controllers are
enabled and updates unit_has_mask_realized() to also consider enable_mask.

Signed-off-by: Tejun Heo <htejun@fb.com>
src/core/cgroup.c