Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319561
b: refs/heads/master
c: e571b0a
h: refs/heads/master
i:
  319559: 6b44df2
v: v3
  • Loading branch information
Christoph Lameter authored and Pekka Enberg committed Jun 14, 2012
1 parent 9fc3aa4 commit 24e8bab
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b5568280c9b9162b384be9d447013b74d682d4b3
refs/heads/master: e571b0ad3495be5793e54e21cd244c4545c49d88
4 changes: 4 additions & 0 deletions trunk/include/linux/mm_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
8 changes: 4 additions & 4 deletions trunk/mm/slab.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 24e8bab

Please sign in to comment.