diff options
Diffstat (limited to 'mm/slab.c')
-rw-r--r-- | mm/slab.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -496,25 +496,25 @@ static bool slab_max_order_set __initdata; | |||
496 | */ | 496 | */ |
497 | static inline void page_set_cache(struct page *page, struct kmem_cache *cache) | 497 | static 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 | ||
502 | static inline struct kmem_cache *page_get_cache(struct page *page) | 502 | static 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 | ||
509 | static inline void page_set_slab(struct page *page, struct slab *slab) | 509 | static 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 | ||
514 | static inline struct slab *page_get_slab(struct page *page) | 514 | static 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 | ||
520 | static inline struct kmem_cache *virt_to_cache(const void *obj) | 520 | static inline struct kmem_cache *virt_to_cache(const void *obj) |