aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/slab.c b/mm/slab.c
index e901a36e2520..af05147d7abd 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -496,25 +496,25 @@ static bool slab_max_order_set __initdata;
496 */ 496 */
497static inline void page_set_cache(struct page *page, struct kmem_cache *cache) 497static inline void page_set_cache(struct page *page, struct kmem_cache *cache)
498{ 498{
499 page->lru.next = (struct list_head *)cache; 499 page->slab_cache = cache;
500} 500}
501 501
502static inline struct kmem_cache *page_get_cache(struct page *page) 502static inline struct kmem_cache *page_get_cache(struct page *page)
503{ 503{
504 page = compound_head(page); 504 page = compound_head(page);
505 BUG_ON(!PageSlab(page)); 505 BUG_ON(!PageSlab(page));
506 return (struct kmem_cache *)page->lru.next; 506 return page->slab_cache;
507} 507}
508 508
509static inline void page_set_slab(struct page *page, struct slab *slab) 509static inline void page_set_slab(struct page *page, struct slab *slab)
510{ 510{
511 page->lru.prev = (struct list_head *)slab; 511 page->slab_page = slab;
512} 512}
513 513
514static inline struct slab *page_get_slab(struct page *page) 514static inline struct slab *page_get_slab(struct page *page)
515{ 515{
516 BUG_ON(!PageSlab(page)); 516 BUG_ON(!PageSlab(page));
517 return (struct slab *)page->lru.prev; 517 return page->slab_page;
518} 518}
519 519
520static inline struct kmem_cache *virt_to_cache(const void *obj) 520static inline struct kmem_cache *virt_to_cache(const void *obj)