aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.h
diff options
context:
space:
mode:
Diffstat (limited to 'mm/slab.h')
-rw-r--r--mm/slab.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/slab.h b/mm/slab.h
index 620ceeddbe1a..a535033f7e9a 100644
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -162,6 +162,8 @@ static inline const char *cache_name(struct kmem_cache *s)
162 162
163static inline struct kmem_cache *cache_from_memcg(struct kmem_cache *s, int idx) 163static inline struct kmem_cache *cache_from_memcg(struct kmem_cache *s, int idx)
164{ 164{
165 if (!s->memcg_params)
166 return NULL;
165 return s->memcg_params->memcg_caches[idx]; 167 return s->memcg_params->memcg_caches[idx];
166} 168}
167 169