diff options
Diffstat (limited to 'include/linux/hugetlb_cgroup.h')
-rw-r--r-- | include/linux/hugetlb_cgroup.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/include/linux/hugetlb_cgroup.h b/include/linux/hugetlb_cgroup.h index bcc853eccc85..24154c26d469 100644 --- a/include/linux/hugetlb_cgroup.h +++ b/include/linux/hugetlb_cgroup.h | |||
@@ -32,7 +32,7 @@ static inline struct hugetlb_cgroup *hugetlb_cgroup_from_page(struct page *page) | |||
32 | 32 | ||
33 | if (compound_order(page) < HUGETLB_CGROUP_MIN_ORDER) | 33 | if (compound_order(page) < HUGETLB_CGROUP_MIN_ORDER) |
34 | return NULL; | 34 | return NULL; |
35 | return (struct hugetlb_cgroup *)page[2].lru.next; | 35 | return (struct hugetlb_cgroup *)page[2].private; |
36 | } | 36 | } |
37 | 37 | ||
38 | static inline | 38 | static inline |
@@ -42,15 +42,13 @@ int set_hugetlb_cgroup(struct page *page, struct hugetlb_cgroup *h_cg) | |||
42 | 42 | ||
43 | if (compound_order(page) < HUGETLB_CGROUP_MIN_ORDER) | 43 | if (compound_order(page) < HUGETLB_CGROUP_MIN_ORDER) |
44 | return -1; | 44 | return -1; |
45 | page[2].lru.next = (void *)h_cg; | 45 | page[2].private = (unsigned long)h_cg; |
46 | return 0; | 46 | return 0; |
47 | } | 47 | } |
48 | 48 | ||
49 | static inline bool hugetlb_cgroup_disabled(void) | 49 | static inline bool hugetlb_cgroup_disabled(void) |
50 | { | 50 | { |
51 | if (hugetlb_cgrp_subsys.disabled) | 51 | return !cgroup_subsys_enabled(hugetlb_cgrp_subsys); |
52 | return true; | ||
53 | return false; | ||
54 | } | 52 | } |
55 | 53 | ||
56 | extern int hugetlb_cgroup_charge_cgroup(int idx, unsigned long nr_pages, | 54 | extern int hugetlb_cgroup_charge_cgroup(int idx, unsigned long nr_pages, |