Commit a618e89f authored by Glauber Costa's avatar Glauber Costa Committed by Pekka Enberg

slab: rename gfpflags to allocflags

A consistent name with slub saves us an acessor function.
In both caches, this field represents the same thing. We would
like to use it from the mem_cgroup code.
Signed-off-by: default avatarGlauber Costa <glommer@parallels.com>
Acked-by: default avatarChristoph Lameter <cl@linux.com>
CC: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
parent 43d77867
...@@ -39,7 +39,7 @@ struct kmem_cache { ...@@ -39,7 +39,7 @@ struct kmem_cache {
unsigned int gfporder; unsigned int gfporder;
/* force GFP flags, e.g. GFP_DMA */ /* force GFP flags, e.g. GFP_DMA */
gfp_t gfpflags; gfp_t allocflags;
size_t colour; /* cache colouring range */ size_t colour; /* cache colouring range */
unsigned int colour_off; /* colour offset */ unsigned int colour_off; /* colour offset */
......
...@@ -1771,7 +1771,7 @@ static void *kmem_getpages(struct kmem_cache *cachep, gfp_t flags, int nodeid) ...@@ -1771,7 +1771,7 @@ static void *kmem_getpages(struct kmem_cache *cachep, gfp_t flags, int nodeid)
flags |= __GFP_COMP; flags |= __GFP_COMP;
#endif #endif
flags |= cachep->gfpflags; flags |= cachep->allocflags;
if (cachep->flags & SLAB_RECLAIM_ACCOUNT) if (cachep->flags & SLAB_RECLAIM_ACCOUNT)
flags |= __GFP_RECLAIMABLE; flags |= __GFP_RECLAIMABLE;
...@@ -2482,9 +2482,9 @@ kmem_cache_create (const char *name, size_t size, size_t align, ...@@ -2482,9 +2482,9 @@ kmem_cache_create (const char *name, size_t size, size_t align,
cachep->colour = left_over / cachep->colour_off; cachep->colour = left_over / cachep->colour_off;
cachep->slab_size = slab_size; cachep->slab_size = slab_size;
cachep->flags = flags; cachep->flags = flags;
cachep->gfpflags = 0; cachep->allocflags = 0;
if (CONFIG_ZONE_DMA_FLAG && (flags & SLAB_CACHE_DMA)) if (CONFIG_ZONE_DMA_FLAG && (flags & SLAB_CACHE_DMA))
cachep->gfpflags |= GFP_DMA; cachep->allocflags |= GFP_DMA;
cachep->size = size; cachep->size = size;
cachep->reciprocal_buffer_size = reciprocal_value(size); cachep->reciprocal_buffer_size = reciprocal_value(size);
...@@ -2831,9 +2831,9 @@ static void kmem_flagcheck(struct kmem_cache *cachep, gfp_t flags) ...@@ -2831,9 +2831,9 @@ static void kmem_flagcheck(struct kmem_cache *cachep, gfp_t flags)
{ {
if (CONFIG_ZONE_DMA_FLAG) { if (CONFIG_ZONE_DMA_FLAG) {
if (flags & GFP_DMA) if (flags & GFP_DMA)
BUG_ON(!(cachep->gfpflags & GFP_DMA)); BUG_ON(!(cachep->allocflags & GFP_DMA));
else else
BUG_ON(cachep->gfpflags & GFP_DMA); BUG_ON(cachep->allocflags & GFP_DMA);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment