cgroup: refactor the cgroup_attach_lock code to make it clearer

Dynamic cgroup migration involving threadgroup locks can be in one of
two states: no lock held, or holding the global lock. Explicitly
declaring the different lock modes to make the code easier to
understand and facilitates future extensions of the lock modes.

Signed-off-by: Yi Tao <escape@linux.alibaba.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
Yi Tao 2025-09-10 14:59:33 +08:00 • committed by Tejun Heo
commit a1ffc8ad31
4 changed files with 69 additions and 29 deletions