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/cgroup_freezer.c | |
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/cgroup_freezer.c')
-rw-r--r-- | kernel/cgroup_freezer.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/kernel/cgroup_freezer.c b/kernel/cgroup_freezer.c index ee8bb671688c..75dda1ea5026 100644 --- a/kernel/cgroup_freezer.c +++ b/kernel/cgroup_freezer.c | |||
@@ -92,7 +92,7 @@ static const char *freezer_state_strs(unsigned int state) | |||
92 | 92 | ||
93 | struct cgroup_subsys freezer_subsys; | 93 | struct cgroup_subsys freezer_subsys; |
94 | 94 | ||
95 | static struct cgroup_subsys_state *freezer_create(struct cgroup *cgroup) | 95 | static struct cgroup_subsys_state *freezer_css_alloc(struct cgroup *cgroup) |
96 | { | 96 | { |
97 | struct freezer *freezer; | 97 | struct freezer *freezer; |
98 | 98 | ||
@@ -105,14 +105,14 @@ static struct cgroup_subsys_state *freezer_create(struct cgroup *cgroup) | |||
105 | } | 105 | } |
106 | 106 | ||
107 | /** | 107 | /** |
108 | * freezer_post_create - commit creation of a freezer cgroup | 108 | * freezer_css_online - commit creation of a freezer cgroup |
109 | * @cgroup: cgroup being created | 109 | * @cgroup: cgroup being created |
110 | * | 110 | * |
111 | * We're committing to creation of @cgroup. Mark it online and inherit | 111 | * We're committing to creation of @cgroup. Mark it online and inherit |
112 | * parent's freezing state while holding both parent's and our | 112 | * parent's freezing state while holding both parent's and our |
113 | * freezer->lock. | 113 | * freezer->lock. |
114 | */ | 114 | */ |
115 | static int freezer_post_create(struct cgroup *cgroup) | 115 | static int freezer_css_online(struct cgroup *cgroup) |
116 | { | 116 | { |
117 | struct freezer *freezer = cgroup_freezer(cgroup); | 117 | struct freezer *freezer = cgroup_freezer(cgroup); |
118 | struct freezer *parent = parent_freezer(freezer); | 118 | struct freezer *parent = parent_freezer(freezer); |
@@ -141,13 +141,13 @@ static int freezer_post_create(struct cgroup *cgroup) | |||
141 | } | 141 | } |
142 | 142 | ||
143 | /** | 143 | /** |
144 | * freezer_pre_destroy - initiate destruction of @cgroup | 144 | * freezer_css_offline - initiate destruction of @cgroup |
145 | * @cgroup: cgroup being destroyed | 145 | * @cgroup: cgroup being destroyed |
146 | * | 146 | * |
147 | * @cgroup is going away. Mark it dead and decrement system_freezing_count | 147 | * @cgroup is going away. Mark it dead and decrement system_freezing_count |
148 | * if it was holding one. | 148 | * if it was holding one. |
149 | */ | 149 | */ |
150 | static void freezer_pre_destroy(struct cgroup *cgroup) | 150 | static void freezer_css_offline(struct cgroup *cgroup) |
151 | { | 151 | { |
152 | struct freezer *freezer = cgroup_freezer(cgroup); | 152 | struct freezer *freezer = cgroup_freezer(cgroup); |
153 | 153 | ||
@@ -161,7 +161,7 @@ static void freezer_pre_destroy(struct cgroup *cgroup) | |||
161 | spin_unlock_irq(&freezer->lock); | 161 | spin_unlock_irq(&freezer->lock); |
162 | } | 162 | } |
163 | 163 | ||
164 | static void freezer_destroy(struct cgroup *cgroup) | 164 | static void freezer_css_free(struct cgroup *cgroup) |
165 | { | 165 | { |
166 | kfree(cgroup_freezer(cgroup)); | 166 | kfree(cgroup_freezer(cgroup)); |
167 | } | 167 | } |
@@ -477,10 +477,10 @@ static struct cftype files[] = { | |||
477 | 477 | ||
478 | struct cgroup_subsys freezer_subsys = { | 478 | struct cgroup_subsys freezer_subsys = { |
479 | .name = "freezer", | 479 | .name = "freezer", |
480 | .create = freezer_create, | 480 | .css_alloc = freezer_css_alloc, |
481 | .post_create = freezer_post_create, | 481 | .css_online = freezer_css_online, |
482 | .pre_destroy = freezer_pre_destroy, | 482 | .css_offline = freezer_css_offline, |
483 | .destroy = freezer_destroy, | 483 | .css_free = freezer_css_free, |
484 | .subsys_id = freezer_subsys_id, | 484 | .subsys_id = freezer_subsys_id, |
485 | .attach = freezer_attach, | 485 | .attach = freezer_attach, |
486 | .fork = freezer_fork, | 486 | .fork = freezer_fork, |