From 18eec587c6697c3f483675bfde72d12ebe32eac0 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 25 Apr 2012 11:03:38 +1000 Subject: [PATCH] memcg-move-hugetlb-resource-count-to-parent-cgroup-on-memcg-removal-fix-fix Cc: Andrea Arcangeli Cc: Aneesh Kumar K.V Cc: Hillf Danton Cc: Johannes Weiner Cc: KAMEZAWA Hiroyuki Cc: Michal Hocko Signed-off-by: Andrew Morton --- include/linux/hugetlb.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 828b073a9f70..a2e45ab1c489 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -343,8 +343,15 @@ static inline unsigned int pages_per_huge_page(struct hstate *h) #define hstate_index(h) 0 #endif +#ifdef CONFIG_CGROUP_MEM_RES_CTLR #ifdef CONFIG_MEM_RES_CTLR_HUGETLB extern int hugetlb_force_memcg_empty(struct cgroup *cgroup); +#else +static inline int hugetlb_force_memcg_empty(struct cgroup *cgroup) +{ + return 0; +} +#endif #endif #endif /* _LINUX_HUGETLB_H */ -- 2.39.5