Skip to content

Commit 48f2474

Browse files
walken-googlepenberg
authored andcommitted
slab: do not call compound_head() in page_get_cache()
page_get_cache() does not need to call compound_head(), as its unique caller virt_to_slab() already makes sure to return a head page. Additionally, removing the compound_head() call makes page_get_cache() consistent with page_get_slab(). Signed-off-by: Michel Lespinasse <walken@google.com> Cc: Christoph Lameter <cl@linux-foundation.org> Cc: Pekka Enberg <penberg@kernel.org> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Pekka Enberg <penberg@kernel.org>
1 parent d9b7f22 commit 48f2474

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

mm/slab.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,6 @@ static bool slab_max_order_set __initdata;
517517

518518
static inline struct kmem_cache *page_get_cache(struct page *page)
519519
{
520-
page = compound_head(page);
521520
BUG_ON(!PageSlab(page));
522521
return page->slab_cache;
523522
}

0 commit comments

Comments
 (0)