Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54242
b: refs/heads/master
c: cfce660
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed May 7, 2007
1 parent 754c352 commit dfc44c7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 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: 4f104934591ed98534b3a4c3d17d972b790e9c42
refs/heads/master: cfce66047f1893cb7d3abb0d53e65cbbd8d605f0
3 changes: 1 addition & 2 deletions trunk/include/linux/gfp.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ struct vm_area_struct;
#define __GFP_REPEAT ((__force gfp_t)0x400u) /* Retry the allocation. Might fail */
#define __GFP_NOFAIL ((__force gfp_t)0x800u) /* Retry for ever. Cannot fail */
#define __GFP_NORETRY ((__force gfp_t)0x1000u)/* Do not retry. Might fail */
#define __GFP_NO_GROW ((__force gfp_t)0x2000u)/* Slab internal usage */
#define __GFP_COMP ((__force gfp_t)0x4000u)/* Add compound page metadata */
#define __GFP_ZERO ((__force gfp_t)0x8000u)/* Return zeroed page on success */
#define __GFP_NOMEMALLOC ((__force gfp_t)0x10000u) /* Don't use emergency reserves */
Expand All @@ -53,7 +52,7 @@ struct vm_area_struct;
/* if you forget to add the bitmask here kernel will crash, period */
#define GFP_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS| \
__GFP_COLD|__GFP_NOWARN|__GFP_REPEAT| \
__GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \
__GFP_NOFAIL|__GFP_NORETRY|__GFP_COMP| \
__GFP_NOMEMALLOC|__GFP_HARDWALL|__GFP_THISNODE)

/* This equals 0, but use constants in case they ever change */
Expand Down
6 changes: 2 additions & 4 deletions trunk/mm/slab.c
Original file line number Diff line number Diff line change
Expand Up @@ -2746,9 +2746,7 @@ static int cache_grow(struct kmem_cache *cachep,
* Be lazy and only check for valid flags here, keeping it out of the
* critical path in kmem_cache_alloc().
*/
BUG_ON(flags & ~(GFP_DMA | GFP_LEVEL_MASK | __GFP_NO_GROW));
if (flags & __GFP_NO_GROW)
return 0;
BUG_ON(flags & ~(GFP_DMA | GFP_LEVEL_MASK));

ctor_flags = SLAB_CTOR_CONSTRUCTOR;
local_flags = (flags & GFP_LEVEL_MASK);
Expand Down Expand Up @@ -3252,7 +3250,7 @@ static void *fallback_alloc(struct kmem_cache *cache, gfp_t flags)
flags | GFP_THISNODE, nid);
}

if (!obj && !(flags & __GFP_NO_GROW)) {
if (!obj) {
/*
* This allocation will be performed within the constraints
* of the current cpuset / memory policy requirements.
Expand Down
3 changes: 0 additions & 3 deletions trunk/mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,9 +815,6 @@ static struct page *new_slab(struct kmem_cache *s, gfp_t flags, int node)
void *last;
void *p;

if (flags & __GFP_NO_GROW)
return NULL;

BUG_ON(flags & ~(GFP_DMA | GFP_LEVEL_MASK));

if (flags & __GFP_WAIT)
Expand Down

0 comments on commit dfc44c7

Please sign in to comment.