Merge branch 'ptp-virtual-clocks-and-timestamping'
[linux-2.6-microblaze.git] / mm / slab.h
index 7f9b4bd..7b60ef2 100644 (file)
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -240,6 +240,8 @@ static inline bool kmem_cache_debug_flags(struct kmem_cache *s, slab_flags_t fla
 #ifdef CONFIG_MEMCG_KMEM
 int memcg_alloc_page_obj_cgroups(struct page *page, struct kmem_cache *s,
                                 gfp_t gfp, bool new_page);
+void mod_objcg_state(struct obj_cgroup *objcg, struct pglist_data *pgdat,
+                    enum node_stat_item idx, int nr);
 
 static inline void memcg_free_page_obj_cgroups(struct page *page)
 {
@@ -284,20 +286,6 @@ static inline bool memcg_slab_pre_alloc_hook(struct kmem_cache *s,
        return true;
 }
 
-static inline void mod_objcg_state(struct obj_cgroup *objcg,
-                                  struct pglist_data *pgdat,
-                                  enum node_stat_item idx, int nr)
-{
-       struct mem_cgroup *memcg;
-       struct lruvec *lruvec;
-
-       rcu_read_lock();
-       memcg = obj_cgroup_memcg(objcg);
-       lruvec = mem_cgroup_lruvec(memcg, pgdat);
-       mod_memcg_lruvec_state(lruvec, idx, nr);
-       rcu_read_unlock();
-}
-
 static inline void memcg_slab_post_alloc_hook(struct kmem_cache *s,
                                              struct obj_cgroup *objcg,
                                              gfp_t flags, size_t size,
@@ -310,7 +298,6 @@ static inline void memcg_slab_post_alloc_hook(struct kmem_cache *s,
        if (!memcg_kmem_enabled() || !objcg)
                return;
 
-       flags &= ~__GFP_ACCOUNT;
        for (i = 0; i < size; i++) {
                if (likely(p[i])) {
                        page = virt_to_head_page(p[i]);