diff mbox series

[04/11] PageSlab: eliminate unnecessary compound_head() calls in mm/debug

Message ID 20211012180148.1669685-5-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
head is resolved at the beginning of the function.

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

Patch

diff --git a/mm/debug.c b/mm/debug.c
index 500f5adce00e..fae0f81ad831 100644
--- a/mm/debug.c
+++ b/mm/debug.c
@@ -84,7 +84,7 @@  static void __dump_page(struct page *page)
 	 * page->_mapcount space in struct page is used by sl[aou]b pages to
 	 * encode own info.
 	 */
-	mapcount = PageSlab(compound_head(head)) ? 0 : page_mapcount(page);
+	mapcount = PageSlab(head) ? 0 : page_mapcount(page);
 
 	pr_warn("page:%p refcount:%d mapcount:%d mapping:%p index:%#lx pfn:%#lx\n",
 			page, page_ref_count(head), mapcount, mapping,