]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
memcg-move-hugetlb-resource-count-to-parent-cgroup-on-memcg-removal-fix-fix
authorAndrew Morton <akpm@linux-foundation.org>
Thu, 3 May 2012 05:43:42 +0000 (15:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 3 May 2012 05:46:26 +0000 (15:46 +1000)
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc: Hillf Danton <dhillf@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/hugetlb.h

index 939cff72b6b72a9193c1087f4b0be9d694bf97b1..ee80bc8401a9c8a5f7c94b708e901eb67f85f718 100644 (file)
@@ -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 */