]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cpuset: decouple tmpmasks and cpumasks freeing in cgroup
authorChen Ridong <chenridong@huawei.com>
Mon, 25 Aug 2025 03:23:50 +0000 (03:23 +0000)
committerTejun Heo <tj@kernel.org>
Mon, 25 Aug 2025 18:19:24 +0000 (08:19 -1000)
commit5806b3d05165568eee665399d3c04349c151a0b9
treeeed0432dc23183ce9fc9032af52f0705d56b211a
parent8d2a75589599fd8cd5c542c8052642445652ca5e
cpuset: decouple tmpmasks and cpumasks freeing in cgroup

Currently, free_cpumasks() can free both tmpmasks and cpumasks of a cpuset
(cs). However, these two operations are not logically coupled. To improve
code clarity:
1. Move cpumask freeing to free_cpuset()
2. Rename free_cpumasks() to free_tmpmasks()

This change enforces the single responsibility principle.

Signed-off-by: Chen Ridong <chenridong@huawei.com>
Reviewed-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/cpuset.c