aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mm/slab.h10
1 files changed, 0 insertions, 10 deletions
diff --git a/mm/slab.h b/mm/slab.h
index 7bb74447b..cc47f1e4a 100644
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -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;