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/gfp.h | 1 + include/linux/slab.h | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff -puN include/linux/slab.h~SLAB_NO_GROW-fix include/linux/slab.h --- 25/include/linux/slab.h~SLAB_NO_GROW-fix 2003-04-24 05:17:14.000000000 -0700 +++ 25-akpm/include/linux/slab.h 2003-04-24 05:17:14.000000000 -0700 @@ -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 diff -puN include/linux/gfp.h~SLAB_NO_GROW-fix include/linux/gfp.h --- 25/include/linux/gfp.h~SLAB_NO_GROW-fix 2003-04-24 05:17:14.000000000 -0700 +++ 25-akpm/include/linux/gfp.h 2003-04-24 05:17:14.000000000 -0700 @@ -31,6 +31,7 @@ #define __GFP_REPEAT 0x400 /* Retry the allocation. Might fail */ #define __GFP_NOFAIL 0x800 /* Retry for ever. Cannot fail */ #define __GFP_NORETRY 0x1000 /* Do not retry. Might fail */ +#define __GFP_NO_GROW 0x2000 /* Slab internal usage */ #define GFP_ATOMIC (__GFP_HIGH) #define GFP_NOIO (__GFP_WAIT) _