Skip to content

Commit

Permalink
slab: do not call compound_head() in page_get_cache()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michel Lespinasse authored and Pekka Enberg committed Aug 16, 2012
1 parent d9b7f22 commit 48f2474
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion mm/slab.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ static bool slab_max_order_set __initdata;

static inline struct kmem_cache *page_get_cache(struct page *page)
{
page = compound_head(page);
BUG_ON(!PageSlab(page));
return page->slab_cache;
}
Expand Down

0 comments on commit 48f2474

Please sign in to comment.