aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-11-19 11:13:38 -0500
committerTejun Heo <tj@kernel.org>2012-11-19 11:13:38 -0500
commit92fb97487a7e41b222c1417cabd1d1ab7cc3a48c (patch)
treec220c622b9ac9b16535535d448e9cd29be72c77e /mm/memcontrol.c
parentb1929db42f8a649d9a9e397119f628c27fd4021f (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 'mm/memcontrol.c')
-rw-r--r--mm/memcontrol.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 08adaaae6fcc..8b0b2b028e23 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4922,7 +4922,7 @@ err_cleanup:
4922} 4922}
4923 4923
4924static struct cgroup_subsys_state * __ref 4924static struct cgroup_subsys_state * __ref
4925mem_cgroup_create(struct cgroup *cont) 4925mem_cgroup_css_alloc(struct cgroup *cont)
4926{ 4926{
4927 struct mem_cgroup *memcg, *parent; 4927 struct mem_cgroup *memcg, *parent;
4928 long error = -ENOMEM; 4928 long error = -ENOMEM;
@@ -5003,14 +5003,14 @@ free_out:
5003 return ERR_PTR(error); 5003 return ERR_PTR(error);
5004} 5004}
5005 5005
5006static void mem_cgroup_pre_destroy(struct cgroup *cont) 5006static void mem_cgroup_css_offline(struct cgroup *cont)
5007{ 5007{
5008 struct mem_cgroup *memcg = mem_cgroup_from_cont(cont); 5008 struct mem_cgroup *memcg = mem_cgroup_from_cont(cont);
5009 5009
5010 mem_cgroup_reparent_charges(memcg); 5010 mem_cgroup_reparent_charges(memcg);
5011} 5011}
5012 5012
5013static void mem_cgroup_destroy(struct cgroup *cont) 5013static void mem_cgroup_css_free(struct cgroup *cont)
5014{ 5014{
5015 struct mem_cgroup *memcg = mem_cgroup_from_cont(cont); 5015 struct mem_cgroup *memcg = mem_cgroup_from_cont(cont);
5016 5016
@@ -5600,9 +5600,9 @@ static void mem_cgroup_move_task(struct cgroup *cont,
5600struct cgroup_subsys mem_cgroup_subsys = { 5600struct cgroup_subsys mem_cgroup_subsys = {
5601 .name = "memory", 5601 .name = "memory",
5602 .subsys_id = mem_cgroup_subsys_id, 5602 .subsys_id = mem_cgroup_subsys_id,
5603 .create = mem_cgroup_create, 5603 .css_alloc = mem_cgroup_css_alloc,
5604 .pre_destroy = mem_cgroup_pre_destroy, 5604 .css_offline = mem_cgroup_css_offline,
5605 .destroy = mem_cgroup_destroy, 5605 .css_free = mem_cgroup_css_free,
5606 .can_attach = mem_cgroup_can_attach, 5606 .can_attach = mem_cgroup_can_attach,
5607 .cancel_attach = mem_cgroup_cancel_attach, 5607 .cancel_attach = mem_cgroup_cancel_attach,
5608 .attach = mem_cgroup_move_task, 5608 .attach = mem_cgroup_move_task,