diff mbox series

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

Message ID 20211012180148.1669685-7-hannes@cmpxchg.org (mailing list archive)
State New
Headers show
Series PageSlab: eliminate unnecessary compound_head() calls | expand

Commit Message

Johannes Weiner Oct. 12, 2021, 6:01 p.m. UTC
The page comes from virt_to_head_page().

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

Patch

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);
 
 	/*