]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cgroup: refactor the cgroup_attach_lock code to make it clearer
authorYi Tao <escape@linux.alibaba.com>
Wed, 10 Sep 2025 06:59:33 +0000 (14:59 +0800)
committerTejun Heo <tj@kernel.org>
Wed, 10 Sep 2025 17:26:15 +0000 (07:26 -1000)
commita1ffc8ad3165fa1cf6a60c6a4b4e00dfd6603cf2
tree5b595ec5e5c0a1a30aae26e0847c1e42af657634
parent4a3e62dfa7b79dc8f759219fe64318ff08e98013
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>
include/linux/cgroup-defs.h
kernel/cgroup/cgroup-internal.h
kernel/cgroup/cgroup-v1.c
kernel/cgroup/cgroup.c