]> 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>
Wed, 25 Apr 2012 01:03:38 +0000 (11:03 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 30 Apr 2012 05:17:22 +0000 (15:17 +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 828b073a9f703ebccadbee00ddb5ced2929a7114..a2e45ab1c489be2a555454cdace279b9156f7631 100644 (file)
@@ -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 */