You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
+7
-7
@@ -77,7 +77,7 @@ static inline bool hugetlb_cgroup_have_usage(struct cgroup *cg)
|
||||
return false;
|
||||
}
|
||||
|
||||
static struct cgroup_subsys_state *hugetlb_cgroup_create(struct cgroup *cgroup)
|
||||
static struct cgroup_subsys_state *hugetlb_cgroup_css_alloc(struct cgroup *cgroup)
|
||||
{
|
||||
int idx;
|
||||
struct cgroup *parent_cgroup;
|
||||
@@ -101,7 +101,7 @@ static struct cgroup_subsys_state *hugetlb_cgroup_create(struct cgroup *cgroup)
|
||||
return &h_cgroup->css;
|
||||
}
|
||||
|
||||
static void hugetlb_cgroup_destroy(struct cgroup *cgroup)
|
||||
static void hugetlb_cgroup_css_free(struct cgroup *cgroup)
|
||||
{
|
||||
struct hugetlb_cgroup *h_cgroup;
|
||||
|
||||
@@ -155,7 +155,7 @@ out:
|
||||
* Force the hugetlb cgroup to empty the hugetlb resources by moving them to
|
||||
* the parent cgroup.
|
||||
*/
|
||||
static void hugetlb_cgroup_pre_destroy(struct cgroup *cgroup)
|
||||
static void hugetlb_cgroup_css_offline(struct cgroup *cgroup)
|
||||
{
|
||||
struct hstate *h;
|
||||
struct page *page;
|
||||
@@ -404,8 +404,8 @@ void hugetlb_cgroup_migrate(struct page *oldhpage, struct page *newhpage)
|
||||
|
||||
struct cgroup_subsys hugetlb_subsys = {
|
||||
.name = "hugetlb",
|
||||
.create = hugetlb_cgroup_create,
|
||||
.pre_destroy = hugetlb_cgroup_pre_destroy,
|
||||
.destroy = hugetlb_cgroup_destroy,
|
||||
.subsys_id = hugetlb_subsys_id,
|
||||
.css_alloc = hugetlb_cgroup_css_alloc,
|
||||
.css_offline = hugetlb_cgroup_css_offline,
|
||||
.css_free = hugetlb_cgroup_css_free,
|
||||
.subsys_id = hugetlb_subsys_id,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user