aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 9cd01fa60004..f4b2e22b5c61 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -602,8 +602,7 @@ static inline void page_set_cache(struct page *page, struct kmem_cache *cache)
602 602
603static inline struct kmem_cache *page_get_cache(struct page *page) 603static inline struct kmem_cache *page_get_cache(struct page *page)
604{ 604{
605 if (unlikely(PageCompound(page))) 605 page = compound_head(page);
606 page = (struct page *)page_private(page);
607 BUG_ON(!PageSlab(page)); 606 BUG_ON(!PageSlab(page));
608 return (struct kmem_cache *)page->lru.next; 607 return (struct kmem_cache *)page->lru.next;
609} 608}
@@ -615,8 +614,7 @@ static inline void page_set_slab(struct page *page, struct slab *slab)
615 614
616static inline struct slab *page_get_slab(struct page *page) 615static inline struct slab *page_get_slab(struct page *page)
617{ 616{
618 if (unlikely(PageCompound(page))) 617 page = compound_head(page);
619 page = (struct page *)page_private(page);
620 BUG_ON(!PageSlab(page)); 618 BUG_ON(!PageSlab(page));
621 return (struct slab *)page->lru.prev; 619 return (struct slab *)page->lru.prev;
622} 620}