From: Andrew Morton Date: Wed, 25 Apr 2012 01:03:38 +0000 (+1000) Subject: memcg-move-hugetlb-resource-count-to-parent-cgroup-on-memcg-removal-fix-fix X-Git-Tag: next-20120430~2^2~136 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=18eec587c6697c3f483675bfde72d12ebe32eac0;p=karo-tx-linux.git 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 --- 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 */