diff options
Diffstat (limited to 'mm/slab.h')
-rw-r--r-- | mm/slab.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -162,6 +162,8 @@ static inline const char *cache_name(struct kmem_cache *s) | |||
162 | 162 | ||
163 | static inline struct kmem_cache *cache_from_memcg(struct kmem_cache *s, int idx) | 163 | static 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 | ||