Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319568
b: refs/heads/master
c: a618e89
h: refs/heads/master
v: v3
  • Loading branch information
Glauber Costa authored and Pekka Enberg committed Jul 2, 2012
1 parent 368bc4d commit 4952c6c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 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: 43d77867a4f333de4e4189114c480dd365133c09
refs/heads/master: a618e89f1e6fb3cdfc8ef0ad54a0d57830bf8881
2 changes: 1 addition & 1 deletion trunk/include/linux/slab_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct kmem_cache {
unsigned int gfporder;

/* force GFP flags, e.g. GFP_DMA */
gfp_t gfpflags;
gfp_t allocflags;

size_t colour; /* cache colouring range */
unsigned int colour_off; /* colour offset */
Expand Down
10 changes: 5 additions & 5 deletions trunk/mm/slab.c
Original file line number Diff line number Diff line change
Expand Up @@ -1771,7 +1771,7 @@ static void *kmem_getpages(struct kmem_cache *cachep, gfp_t flags, int nodeid)
flags |= __GFP_COMP;
#endif

flags |= cachep->gfpflags;
flags |= cachep->allocflags;
if (cachep->flags & SLAB_RECLAIM_ACCOUNT)
flags |= __GFP_RECLAIMABLE;

Expand Down Expand Up @@ -2482,9 +2482,9 @@ kmem_cache_create (const char *name, size_t size, size_t align,
cachep->colour = left_over / cachep->colour_off;
cachep->slab_size = slab_size;
cachep->flags = flags;
cachep->gfpflags = 0;
cachep->allocflags = 0;
if (CONFIG_ZONE_DMA_FLAG && (flags & SLAB_CACHE_DMA))
cachep->gfpflags |= GFP_DMA;
cachep->allocflags |= GFP_DMA;
cachep->size = size;
cachep->reciprocal_buffer_size = reciprocal_value(size);

Expand Down Expand Up @@ -2831,9 +2831,9 @@ static void kmem_flagcheck(struct kmem_cache *cachep, gfp_t flags)
{
if (CONFIG_ZONE_DMA_FLAG) {
if (flags & GFP_DMA)
BUG_ON(!(cachep->gfpflags & GFP_DMA));
BUG_ON(!(cachep->allocflags & GFP_DMA));
else
BUG_ON(cachep->gfpflags & GFP_DMA);
BUG_ON(cachep->allocflags & GFP_DMA);
}
}

Expand Down

0 comments on commit 4952c6c

Please sign in to comment.