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 /mm/hugetlb_cgroup.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 'mm/hugetlb_cgroup.c')
-rw-r--r-- | mm/hugetlb_cgroup.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mm/hugetlb_cgroup.c b/mm/hugetlb_cgroup.c index 0d3a1a317731..b5bde7a5c017 100644 --- a/mm/hugetlb_cgroup.c +++ b/mm/hugetlb_cgroup.c | |||
@@ -77,7 +77,7 @@ static inline bool hugetlb_cgroup_have_usage(struct cgroup *cg) | |||
77 | return false; | 77 | return false; |
78 | } | 78 | } |
79 | 79 | ||
80 | static struct cgroup_subsys_state *hugetlb_cgroup_create(struct cgroup *cgroup) | 80 | static struct cgroup_subsys_state *hugetlb_cgroup_css_alloc(struct cgroup *cgroup) |
81 | { | 81 | { |
82 | int idx; | 82 | int idx; |
83 | struct cgroup *parent_cgroup; | 83 | struct cgroup *parent_cgroup; |
@@ -101,7 +101,7 @@ static struct cgroup_subsys_state *hugetlb_cgroup_create(struct cgroup *cgroup) | |||
101 | return &h_cgroup->css; | 101 | return &h_cgroup->css; |
102 | } | 102 | } |
103 | 103 | ||
104 | static void hugetlb_cgroup_destroy(struct cgroup *cgroup) | 104 | static void hugetlb_cgroup_css_free(struct cgroup *cgroup) |
105 | { | 105 | { |
106 | struct hugetlb_cgroup *h_cgroup; | 106 | struct hugetlb_cgroup *h_cgroup; |
107 | 107 | ||
@@ -155,7 +155,7 @@ out: | |||
155 | * Force the hugetlb cgroup to empty the hugetlb resources by moving them to | 155 | * Force the hugetlb cgroup to empty the hugetlb resources by moving them to |
156 | * the parent cgroup. | 156 | * the parent cgroup. |
157 | */ | 157 | */ |
158 | static void hugetlb_cgroup_pre_destroy(struct cgroup *cgroup) | 158 | static void hugetlb_cgroup_css_offline(struct cgroup *cgroup) |
159 | { | 159 | { |
160 | struct hstate *h; | 160 | struct hstate *h; |
161 | struct page *page; | 161 | struct page *page; |
@@ -404,8 +404,8 @@ void hugetlb_cgroup_migrate(struct page *oldhpage, struct page *newhpage) | |||
404 | 404 | ||
405 | struct cgroup_subsys hugetlb_subsys = { | 405 | struct cgroup_subsys hugetlb_subsys = { |
406 | .name = "hugetlb", | 406 | .name = "hugetlb", |
407 | .create = hugetlb_cgroup_create, | 407 | .css_alloc = hugetlb_cgroup_css_alloc, |
408 | .pre_destroy = hugetlb_cgroup_pre_destroy, | 408 | .css_offline = hugetlb_cgroup_css_offline, |
409 | .destroy = hugetlb_cgroup_destroy, | 409 | .css_free = hugetlb_cgroup_css_free, |
410 | .subsys_id = hugetlb_subsys_id, | 410 | .subsys_id = hugetlb_subsys_id, |
411 | }; | 411 | }; |