diff options
author | Tejun Heo <tj@kernel.org> | 2012-11-19 11:13:38 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2012-11-19 11:13:38 -0500 |
commit | 92fb97487a7e41b222c1417cabd1d1ab7cc3a48c (patch) | |
tree | c220c622b9ac9b16535535d448e9cd29be72c77e /kernel/sched | |
parent | b1929db42f8a649d9a9e397119f628c27fd4021f (diff) |
cgroup: rename ->create/post_create/pre_destroy/destroy() to ->css_alloc/online/offline/free()
Rename cgroup_subsys css lifetime related callbacks to better describe
what their roles are. Also, update documentation.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'kernel/sched')
-rw-r--r-- | kernel/sched/core.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 2d8927fda712..6f20c8fb2326 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -7468,7 +7468,7 @@ static inline struct task_group *cgroup_tg(struct cgroup *cgrp) | |||
7468 | struct task_group, css); | 7468 | struct task_group, css); |
7469 | } | 7469 | } |
7470 | 7470 | ||
7471 | static struct cgroup_subsys_state *cpu_cgroup_create(struct cgroup *cgrp) | 7471 | static struct cgroup_subsys_state *cpu_cgroup_css_alloc(struct cgroup *cgrp) |
7472 | { | 7472 | { |
7473 | struct task_group *tg, *parent; | 7473 | struct task_group *tg, *parent; |
7474 | 7474 | ||
@@ -7485,7 +7485,7 @@ static struct cgroup_subsys_state *cpu_cgroup_create(struct cgroup *cgrp) | |||
7485 | return &tg->css; | 7485 | return &tg->css; |
7486 | } | 7486 | } |
7487 | 7487 | ||
7488 | static void cpu_cgroup_destroy(struct cgroup *cgrp) | 7488 | static void cpu_cgroup_css_free(struct cgroup *cgrp) |
7489 | { | 7489 | { |
7490 | struct task_group *tg = cgroup_tg(cgrp); | 7490 | struct task_group *tg = cgroup_tg(cgrp); |
7491 | 7491 | ||
@@ -7845,8 +7845,8 @@ static struct cftype cpu_files[] = { | |||
7845 | 7845 | ||
7846 | struct cgroup_subsys cpu_cgroup_subsys = { | 7846 | struct cgroup_subsys cpu_cgroup_subsys = { |
7847 | .name = "cpu", | 7847 | .name = "cpu", |
7848 | .create = cpu_cgroup_create, | 7848 | .css_alloc = cpu_cgroup_css_alloc, |
7849 | .destroy = cpu_cgroup_destroy, | 7849 | .css_free = cpu_cgroup_css_free, |
7850 | .can_attach = cpu_cgroup_can_attach, | 7850 | .can_attach = cpu_cgroup_can_attach, |
7851 | .attach = cpu_cgroup_attach, | 7851 | .attach = cpu_cgroup_attach, |
7852 | .exit = cpu_cgroup_exit, | 7852 | .exit = cpu_cgroup_exit, |
@@ -7869,7 +7869,7 @@ struct cgroup_subsys cpu_cgroup_subsys = { | |||
7869 | struct cpuacct root_cpuacct; | 7869 | struct cpuacct root_cpuacct; |
7870 | 7870 | ||
7871 | /* create a new cpu accounting group */ | 7871 | /* create a new cpu accounting group */ |
7872 | static struct cgroup_subsys_state *cpuacct_create(struct cgroup *cgrp) | 7872 | static struct cgroup_subsys_state *cpuacct_css_alloc(struct cgroup *cgrp) |
7873 | { | 7873 | { |
7874 | struct cpuacct *ca; | 7874 | struct cpuacct *ca; |
7875 | 7875 | ||
@@ -7899,7 +7899,7 @@ out: | |||
7899 | } | 7899 | } |
7900 | 7900 | ||
7901 | /* destroy an existing cpu accounting group */ | 7901 | /* destroy an existing cpu accounting group */ |
7902 | static void cpuacct_destroy(struct cgroup *cgrp) | 7902 | static void cpuacct_css_free(struct cgroup *cgrp) |
7903 | { | 7903 | { |
7904 | struct cpuacct *ca = cgroup_ca(cgrp); | 7904 | struct cpuacct *ca = cgroup_ca(cgrp); |
7905 | 7905 | ||
@@ -8070,8 +8070,8 @@ void cpuacct_charge(struct task_struct *tsk, u64 cputime) | |||
8070 | 8070 | ||
8071 | struct cgroup_subsys cpuacct_subsys = { | 8071 | struct cgroup_subsys cpuacct_subsys = { |
8072 | .name = "cpuacct", | 8072 | .name = "cpuacct", |
8073 | .create = cpuacct_create, | 8073 | .css_alloc = cpuacct_css_alloc, |
8074 | .destroy = cpuacct_destroy, | 8074 | .css_free = cpuacct_css_free, |
8075 | .subsys_id = cpuacct_subsys_id, | 8075 | .subsys_id = cpuacct_subsys_id, |
8076 | .base_cftypes = files, | 8076 | .base_cftypes = files, |
8077 | }; | 8077 | }; |