]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup: restructure child_subsys_mask handling in cgroup_subtree_control_write()
authorTejun Heo <tj@kernel.org>
Tue, 18 Nov 2014 07:49:50 +0000 (02:49 -0500)
committerTejun Heo <tj@kernel.org>
Tue, 18 Nov 2014 07:49:50 +0000 (02:49 -0500)
commiteaf41ff506a08b14a328f9106d2356d6aa4f6fcf
tree5b2a32ce799333ccf8db0a7ffdc0e0df7be2e695
parent8389af5ce88a1dd95ab78ac712ca7240c1ec4d0f
cgroup: restructure child_subsys_mask handling in cgroup_subtree_control_write()

Make cgroup_subtree_control_write() first calculate new
subtree_control (new_sc), child_subsys_mask (new_ss) and
css_enable/disable masks before applying them to the cgroup.  Also,
store the original subtree_control (old_sc) and child_subsys_mask
(old_ss) and use them to restore the orignal state after failure.

This patch shouldn't cause any behavior changes.  This prepares for a
fix for a bug in the async css offline wait logic.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Zefan Li <lizefan@huawei.com>
kernel/cgroup.c