aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/memcontrol.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/memcontrol.h')
-rw-r--r--include/linux/memcontrol.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 7d1f119c796e..f5b47efab48b 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -30,6 +30,13 @@ extern void mm_free_cgroup(struct mm_struct *mm);
30extern void page_assign_page_cgroup(struct page *page, 30extern void page_assign_page_cgroup(struct page *page,
31 struct page_cgroup *pc); 31 struct page_cgroup *pc);
32extern struct page_cgroup *page_get_page_cgroup(struct page *page); 32extern struct page_cgroup *page_get_page_cgroup(struct page *page);
33extern int mem_cgroup_charge(struct page *page, struct mm_struct *mm);
34extern void mem_cgroup_uncharge(struct page_cgroup *pc);
35
36static inline void mem_cgroup_uncharge_page(struct page *page)
37{
38 mem_cgroup_uncharge(page_get_page_cgroup(page));
39}
33 40
34#else /* CONFIG_CGROUP_MEM_CONT */ 41#else /* CONFIG_CGROUP_MEM_CONT */
35static inline void mm_init_cgroup(struct mm_struct *mm, 42static inline void mm_init_cgroup(struct mm_struct *mm,
@@ -51,6 +58,19 @@ static inline struct page_cgroup *page_get_page_cgroup(struct page *page)
51 return NULL; 58 return NULL;
52} 59}
53 60
61static inline int mem_cgroup_charge(struct page *page, struct mm_struct *mm)
62{
63 return 0;
64}
65
66static inline void mem_cgroup_uncharge(struct page_cgroup *pc)
67{
68}
69
70static inline void mem_cgroup_uncharge_page(struct page *page)
71{
72}
73
54#endif /* CONFIG_CGROUP_MEM_CONT */ 74#endif /* CONFIG_CGROUP_MEM_CONT */
55 75
56#endif /* _LINUX_MEMCONTROL_H */ 76#endif /* _LINUX_MEMCONTROL_H */