[PATCH 1/9] compile-fix

From: KAMEZAWA Hiroyuki
Date: Thu Apr 26 2012 - 04:51:52 EST


My version of compile fix for linux-next, discussed between Andrew and
Aneesh.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
---
include/linux/hugetlb.h | 4 ----
include/linux/memcontrol.h | 15 +++++++++++++++
2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 828b073..fc226be 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -343,8 +343,4 @@ static inline unsigned int pages_per_huge_page(struct hstate *h)
#define hstate_index(h) 0
#endif

-#ifdef CONFIG_MEM_RES_CTLR_HUGETLB
-extern int hugetlb_force_memcg_empty(struct cgroup *cgroup);
-#endif
-
#endif /* _LINUX_HUGETLB_H */
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index f173811..ca0914a 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -450,9 +450,14 @@ extern int mem_cgroup_move_hugetlb_parent(int idx, struct cgroup *cgroup,
struct page *page);
extern bool mem_cgroup_have_hugetlb_usage(struct cgroup *cgroup);

+extern int hugetlb_force_memcg_empty(struct cgroup *cgroup);
+
extern void mem_cgroup_hugetlb_migrate(struct page *oldhpage,
struct page *newhpage);
#else
+struct cgroup;
+struct mem_cgroup;
+
static inline int
mem_cgroup_hugetlb_charge_page(int idx, unsigned long nr_pages,
struct mem_cgroup **ptr)
@@ -494,6 +499,16 @@ mem_cgroup_move_hugetlb_parent(int idx, struct cgroup *cgroup,
return 0;
}

+static inline void mem_cgroup_hugetlb_migrate(struct page *oldhpage,
+ struct page *newhpage)
+{
+ return;
+}
+
+static inline int hugetlb_force_memcg_empty(struct cgroup *cgroup)
+{
+ return 0;
+}
#endif /* CONFIG_MEM_RES_CTLR_HUGETLB */
#endif /* _LINUX_MEMCONTROL_H */

--
1.7.4.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/