aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/slab.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/slab.h b/mm/slab.h
index f96b49e4704e..4d6d836247dd 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