From 24e8bab21ef0ed0f6df48e0eabc8d1e18de05c29 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Wed, 13 Jun 2012 10:24:55 -0500 Subject: [PATCH] --- yaml --- r: 319561 b: refs/heads/master c: e571b0ad3495be5793e54e21cd244c4545c49d88 h: refs/heads/master i: 319559: 6b44df2105dfea956d08c038b7d0dce40402edc7 v: v3 --- [refs] | 2 +- trunk/include/linux/mm_types.h | 4 ++++ trunk/mm/slab.c | 8 ++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 377381accb38..f6d25557b406 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b5568280c9b9162b384be9d447013b74d682d4b3 +refs/heads/master: e571b0ad3495be5793e54e21cd244c4545c49d88 diff --git a/trunk/include/linux/mm_types.h b/trunk/include/linux/mm_types.h index 5922c3452592..680a5e4e8cd5 100644 --- a/trunk/include/linux/mm_types.h +++ b/trunk/include/linux/mm_types.h @@ -110,6 +110,10 @@ struct page { }; struct list_head list; /* slobs list of pages */ + struct { /* slab fields */ + struct kmem_cache *slab_cache; + struct slab *slab_page; + }; }; /* Remainder is not double word aligned */ diff --git a/trunk/mm/slab.c b/trunk/mm/slab.c index e901a36e2520..af05147d7abd 100644 --- a/trunk/mm/slab.c +++ b/trunk/mm/slab.c @@ -496,25 +496,25 @@ static bool slab_max_order_set __initdata; */ static inline void page_set_cache(struct page *page, struct kmem_cache *cache) { - page->lru.next = (struct list_head *)cache; + page->slab_cache = cache; } static inline struct kmem_cache *page_get_cache(struct page *page) { page = compound_head(page); BUG_ON(!PageSlab(page)); - return (struct kmem_cache *)page->lru.next; + return page->slab_cache; } static inline void page_set_slab(struct page *page, struct slab *slab) { - page->lru.prev = (struct list_head *)slab; + page->slab_page = slab; } static inline struct slab *page_get_slab(struct page *page) { BUG_ON(!PageSlab(page)); - return (struct slab *)page->lru.prev; + return page->slab_page; } static inline struct kmem_cache *virt_to_cache(const void *obj)