diff options
| -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; |
