Commit b48c6a80 authored by Tejun Heo's avatar Tejun Heo

cgroup: trivial cleanup for cgroup_init/load_subsys()

Consistently use @css and @dummytop in these two functions instead of
referring to them indirectly.
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Acked-by: default avatarLi Zefan <lizefan@huawei.com>
parent 38b53aba
...@@ -4332,7 +4332,7 @@ static void __init cgroup_init_subsys(struct cgroup_subsys *ss) ...@@ -4332,7 +4332,7 @@ static void __init cgroup_init_subsys(struct cgroup_subsys *ss)
* pointer to this state - since the subsystem is * pointer to this state - since the subsystem is
* newly registered, all tasks and hence the * newly registered, all tasks and hence the
* init_css_set is in the subsystem's top cgroup. */ * init_css_set is in the subsystem's top cgroup. */
init_css_set.subsys[ss->subsys_id] = dummytop->subsys[ss->subsys_id]; init_css_set.subsys[ss->subsys_id] = css;
need_forkexit_callback |= ss->fork || ss->exit; need_forkexit_callback |= ss->fork || ss->exit;
...@@ -4344,7 +4344,7 @@ static void __init cgroup_init_subsys(struct cgroup_subsys *ss) ...@@ -4344,7 +4344,7 @@ static void __init cgroup_init_subsys(struct cgroup_subsys *ss)
ss->active = 1; ss->active = 1;
if (ss->post_create) if (ss->post_create)
ss->post_create(&ss->root->top_cgroup); ss->post_create(dummytop);
/* this function shouldn't be used with modular subsystems, since they /* this function shouldn't be used with modular subsystems, since they
* need to register a subsys_id, among other things */ * need to register a subsys_id, among other things */
...@@ -4456,7 +4456,7 @@ int __init_or_module cgroup_load_subsys(struct cgroup_subsys *ss) ...@@ -4456,7 +4456,7 @@ int __init_or_module cgroup_load_subsys(struct cgroup_subsys *ss)
ss->active = 1; ss->active = 1;
if (ss->post_create) if (ss->post_create)
ss->post_create(&ss->root->top_cgroup); ss->post_create(dummytop);
/* success! */ /* success! */
mutex_unlock(&cgroup_mutex); mutex_unlock(&cgroup_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment