diff options
| author | Andrew Morton <akpm@digeo.com> | 2003-04-29 17:31:22 -0700 |
|---|---|---|
| committer | Christoph Hellwig <hch@lst.de> | 2003-04-29 17:31:22 -0700 |
| commit | e5ded0b1d26fceb4a59547fa4d1fcf3fb3983b5b (patch) | |
| tree | 13121a39121bf038a3fc49bd822ffdf1a28a9379 /include/linux | |
| parent | c007c1ed97d2b716e215567a95881e76ff58e1d9 (diff) | |
[PATCH] Fix slab-vs-gfp bitflag clash
Fixes a bug spotted by Alexey Mahotkin <alexm@hsys.msk.ru>: 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.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/gfp.h | 1 | ||||
| -rw-r--r-- | include/linux/slab.h | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index ade6d9e97475..be82baa340fa 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -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) 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 |
