[PATCH 06/11] PageSlab: eliminate unnecessary compound_head() call in mm/nommu

From: Johannes Weiner
Date: Tue Oct 12 2021 - 14:02:23 EST


The page comes from virt_to_head_page().

Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx>
---
mm/nommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/nommu.c b/mm/nommu.c
index c233126dd476..02d2427b8f9e 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -87,7 +87,7 @@ unsigned int kobjsize(const void *objp)
* If the allocator sets PageSlab, we know the pointer came from
* kmalloc().
*/
- if (PageSlab(compound_head(page)))
+ if (PageSlab(page))
return ksize(objp);

/*
--
2.32.0