summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2016-03-03 14:58:00 (GMT)
committerTejun Heo <tj@kernel.org>2016-03-03 14:58:00 (GMT)
commit945ba1996888809cf510a8da000a9c20a9fab5ad (patch)
tree4bf5e7a11fbb4c80148c53c77be5105f131cf5a0 /Makefile
parentf7b2814bb9b6cb1d69333e1592c702260fcb4184 (diff)
downloadlinux-945ba1996888809cf510a8da000a9c20a9fab5ad.tar.xz
cgroup: combine cgroup_mutex locking and offline css draining
cgroup_drain_offline() is used to wait for csses being offlined to uninstall itself from cgroup->subsys[] array so that new csses can be installed. The function's only user, cgroup_subtree_control_write(), calls it after performing some checks and restarts the whole process via restart_syscall() if draining has to release cgroup_mutex to wait. This can be simplified by draining before other synchronized operations so that there's nothing to restart. This patch converts cgroup_drain_offline() to cgroup_lock_and_drain_offline() which performs both locking and draining and updates cgroup_kn_lock_live() use it instead of cgroup_mutex() if requested. This combined locking and draining operations are easier to use and less error-prone. While at it, add WARNs in control_apply functions which triggers if the subtree isn't properly drained. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Zefan Li <lizefan@huawei.com>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions