diff options
author | Tejun Heo <tj@kernel.org> | 2013-08-14 00:22:50 (GMT) |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-08-14 00:22:50 (GMT) |
commit | ae7f164a09408bf21ab3c82a9e80a3ff37aa9e3e (patch) | |
tree | 0259abbfa2fb842dc7b55480b297f72a0ce0f9cd /kernel/uid16.c | |
parent | 623f926b050e12b0f5e3a2f4d11c36e4ddd63541 (diff) | |
download | linux-fsl-qoriq-ae7f164a09408bf21ab3c82a9e80a3ff37aa9e3e.tar.xz |
cgroup: move cgroup->subsys[] assignment to online_css()
Currently, css (cgroup_subsys_state) lifetime is tied to that of the
associated cgroup. With the planned unified hierarchy, css's will be
dynamically created and destroyed within the lifetime of a cgroup. To
enable such usages, css's will be individually RCU protected instead
of being tied to the cgroup.
In preparation, this patch moves cgroup->subsys[] assignment from
init_css() to online_css(). As this means that a newly initialized
css should be remembered separately and that cgroup_css() returns NULL
between init and online, cgroup_create() is updated so that it stores
newly created css's in a local array css_ar[] and
cgroup_init/load_subsys() are updated to use local variable @css
instead of using cgroup_css(). This change also slightly simplifies
error path of cgroup_create().
While this patch changes when cgroup->subsys[] is initialized, this
change isn't visible to subsystems or userland.
v2: This patch wasn't updated accordingly after the previous "cgroup:
reorganize css init / exit paths" was updated leading to missing a
css_ar[] conversion in cgroup_create() and thus boot failure. Fix
it.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'kernel/uid16.c')
0 files changed, 0 insertions, 0 deletions