aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/slab.c b/mm/slab.c
index bab6fec765a7..e265865e8700 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1933,7 +1933,7 @@ static void kmem_freepages(struct kmem_cache *cachep, void *addr)
1933 } 1933 }
1934 if (current->reclaim_state) 1934 if (current->reclaim_state)
1935 current->reclaim_state->reclaimed_slab += nr_freed; 1935 current->reclaim_state->reclaimed_slab += nr_freed;
1936 free_pages((unsigned long)addr, cachep->gfporder); 1936 free_memcg_kmem_pages((unsigned long)addr, cachep->gfporder);
1937} 1937}
1938 1938
1939static void kmem_rcu_free(struct rcu_head *head) 1939static void kmem_rcu_free(struct rcu_head *head)
@@ -3486,6 +3486,8 @@ slab_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid,
3486 if (slab_should_failslab(cachep, flags)) 3486 if (slab_should_failslab(cachep, flags))
3487 return NULL; 3487 return NULL;
3488 3488
3489 cachep = memcg_kmem_get_cache(cachep, flags);
3490
3489 cache_alloc_debugcheck_before(cachep, flags); 3491 cache_alloc_debugcheck_before(cachep, flags);
3490 local_irq_save(save_flags); 3492 local_irq_save(save_flags);
3491 3493
@@ -3571,6 +3573,8 @@ slab_alloc(struct kmem_cache *cachep, gfp_t flags, unsigned long caller)
3571 if (slab_should_failslab(cachep, flags)) 3573 if (slab_should_failslab(cachep, flags))
3572 return NULL; 3574 return NULL;
3573 3575
3576 cachep = memcg_kmem_get_cache(cachep, flags);
3577
3574 cache_alloc_debugcheck_before(cachep, flags); 3578 cache_alloc_debugcheck_before(cachep, flags);
3575 local_irq_save(save_flags); 3579 local_irq_save(save_flags);
3576 objp = __do_cache_alloc(cachep, flags); 3580 objp = __do_cache_alloc(cachep, flags);