]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup: introduce CSS_ONLINE flag and on/offline_css() helpers
authorTejun Heo <tj@kernel.org>
Mon, 19 Nov 2012 16:13:37 +0000 (08:13 -0800)
committerTejun Heo <tj@kernel.org>
Mon, 19 Nov 2012 16:13:37 +0000 (08:13 -0800)
commit86d62d91ef73683e1c3433cd9c87b7ec65d154e7
treefd9e909ad92609eb189d406c4812325788d25bbc
parent082def044ba4ad6f8b3e96ea93c289e94c7c2425
cgroup: introduce CSS_ONLINE flag and on/offline_css() helpers

New helpers on/offline_css() respectively wrap ->post_create() and
->pre_destroy() invocations.  online_css() sets CSS_ONLINE after
->post_create() is complete and offline_css() invokes ->pre_destroy()
iff CSS_ONLINE is set and clears it while also handling the temporary
dropping of cgroup_mutex.

This patch doesn't introduce any behavior change at the moment but
will be used to improve cgroup_create() failure path and allow
->post_create() to fail.

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