From 10c5b54fe61cb596b7ad6309cadaca080f2069cc Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Thu, 3 May 2012 15:43:42 +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 939cff72b6b7..ee80bc8401a9 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -348,8 +348,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