diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2017-03-30 23:07:09 -0400 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2018-05-16 13:24:41 +0200 |
| commit | 8dee796c6a523ca052d558df176e0fd27f7e07fd (patch) | |
| tree | dad2398e4eaeb57ebe7528adf2da90e2c33a102e | |
| parent | 9cfb88485844ba83beed5854e7458677bba4f5c1 (diff) | |
always perform cache_from_obj sanity checks
| -rw-r--r-- | mm/slab.h | 10 |
1 files changed, 0 insertions, 10 deletions
@@ -209,16 +209,6 @@ static inline struct kmem_cache *cache_from_obj(struct kmem_cache *s, void *x) struct kmem_cache *cachep; struct page *page; - /* - * When kmemcg is not being used, both assignments should return the - * same value. but we don't want to pay the assignment price in that - * case. If it is not compiled in, the compiler should be smart enough - * to not do even the assignment. In that case, slab_equal_or_root - * will also be a constant. - */ - if (!memcg_kmem_enabled() && !unlikely(s->flags & SLAB_DEBUG_FREE)) - return s; - page = virt_to_head_page(x); BUG_ON(!PageSlab(page)); cachep = page->slab_cache; |
