From e5ded0b1d26fceb4a59547fa4d1fcf3fb3983b5b Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Tue, 29 Apr 2003 17:31:22 -0700 Subject: [PATCH] Fix slab-vs-gfp bitflag clash Fixes a bug spotted by Alexey Mahotkin : the slab-internal SLAB_NO_GROW bit clashes with __GFP_NORETRY. Fix that up so it won't happen again by moving the bit layout into gfp.h. --- include/linux/slab.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include/linux/slab.h') diff --git a/include/linux/slab.h b/include/linux/slab.h index 603748b9b349..49374df2d450 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -22,8 +22,11 @@ typedef struct kmem_cache_s kmem_cache_t; #define SLAB_KERNEL GFP_KERNEL #define SLAB_DMA GFP_DMA -#define SLAB_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS|__GFP_COLD|__GFP_NOWARN|__GFP_REPEAT|__GFP_NOFAIL|__GFP_NORETRY) -#define SLAB_NO_GROW 0x00001000UL /* don't grow a cache */ +#define SLAB_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS|\ + __GFP_COLD|__GFP_NOWARN|__GFP_REPEAT|\ + __GFP_NOFAIL|__GFP_NORETRY) + +#define SLAB_NO_GROW __GFP_NO_GROW /* don't grow a cache */ /* flags to pass to kmem_cache_create(). * The first 3 are only valid when the allocator as been build -- cgit v1.2.3