Commit:     3062fc67dad01b1d2a15d58c709eff946389eca4
Parent:     e1a1cd590e3fcb0d2e230128daf2337ea55387dc
Author:     David Rientjes <[EMAIL PROTECTED]>
AuthorDate: Thu Feb 7 00:14:03 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu Feb 7 08:42:19 2008 -0800

    memcontrol: move mm_cgroup to header file
    Inline functions must preceed their use, so mm_cgroup() should be defined
    in linux/memcontrol.h.
    include/linux/memcontrol.h:48: warning: 'mm_cgroup' declared inline after
        being called
    include/linux/memcontrol.h:48: warning: previous declaration of
        'mm_cgroup' was here
    [EMAIL PROTECTED]: build fix]
    [EMAIL PROTECTED]: nuther build fix]
    Cc: Balbir Singh <[EMAIL PROTECTED]>
    Signed-off-by: David Rientjes <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 include/linux/memcontrol.h |   11 +++++++++--
 mm/memcontrol.c            |    5 -----
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index cc0ad71..4f58026 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -20,6 +20,9 @@
+#include <linux/rcupdate.h>
+#include <linux/mm.h>
 struct mem_cgroup;
 struct page_cgroup;
 struct page;
@@ -45,7 +48,11 @@ extern unsigned long mem_cgroup_isolate_pages(unsigned long 
 extern void mem_cgroup_out_of_memory(struct mem_cgroup *mem, gfp_t gfp_mask);
 extern int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm,
                                        gfp_t gfp_mask);
-extern struct mem_cgroup *mm_cgroup(struct mm_struct *mm);
+static inline struct mem_cgroup *mm_cgroup(const struct mm_struct *mm)
+       return rcu_dereference(mm->mem_cgroup);
 static inline void mem_cgroup_uncharge_page(struct page *page)
@@ -98,7 +105,7 @@ static inline int mem_cgroup_cache_charge(struct page *page,
        return 0;
-static inline struct mem_cgroup *mm_cgroup(struct mm_struct *mm)
+static inline struct mem_cgroup *mm_cgroup(const struct mm_struct *mm)
        return NULL;
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index ac87744..f6cdbf7 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -110,11 +110,6 @@ struct mem_cgroup *mem_cgroup_from_task(struct task_struct 
                                struct mem_cgroup, css);
-inline struct mem_cgroup *mm_cgroup(struct mm_struct *mm)
-       return rcu_dereference(mm->mem_cgroup);
 void mm_init_cgroup(struct mm_struct *mm, struct task_struct *p)
        struct mem_cgroup *mem;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to