diff options
Diffstat (limited to 'mm/slab.c')
-rw-r--r-- | mm/slab.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -602,8 +602,7 @@ static inline void page_set_cache(struct page *page, struct kmem_cache *cache) | |||
602 | 602 | ||
603 | static inline struct kmem_cache *page_get_cache(struct page *page) | 603 | static 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 | ||
616 | static inline struct slab *page_get_slab(struct page *page) | 615 | static 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 | } |