summaryrefslogtreecommitdiff
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-10-27 13:37:40 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-10-27 13:37:40 -0300
commitbadc0e42604c4465facd81d2323e98b3b1eb9188 (patch)
treee61811e7ddf70517f4b546d522ba3b630b38f50f /include/linux/mm.h
parentf19866e5cb04f8f007cb422132ea4611cdacc8e3 (diff)
Linux-libre 4.2.4-gnupck-4.2.4-gnu
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 8a6e1fc37..6293566d7 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -916,6 +916,27 @@ static inline void set_page_links(struct page *page, enum zone_type zone,
#endif
}
+#ifdef CONFIG_MEMCG
+static inline struct mem_cgroup *page_memcg(struct page *page)
+{
+ return page->mem_cgroup;
+}
+
+static inline void set_page_memcg(struct page *page, struct mem_cgroup *memcg)
+{
+ page->mem_cgroup = memcg;
+}
+#else
+static inline struct mem_cgroup *page_memcg(struct page *page)
+{
+ return NULL;
+}
+
+static inline void set_page_memcg(struct page *page, struct mem_cgroup *memcg)
+{
+}
+#endif
+
/*
* Some inline functions in vmstat.h depend on page_zone()
*/