Skip to content

Commit

Permalink
Revert "SLUB: remove useless masking of GFP_ZERO"
Browse files Browse the repository at this point in the history
This reverts commit 3811dbf.

The masking was not at all useless, and it was sensible.  We handle
GFP_ZERO in the caller, and passing it down to any page allocator logic
is buggy and wrong.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Linus Torvalds committed Mar 28, 2008
1 parent 8536bba commit e72e9c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -1470,6 +1470,9 @@ static void *__slab_alloc(struct kmem_cache *s,
void **object;
struct page *new;

/* We handle __GFP_ZERO in the caller */
gfpflags &= ~__GFP_ZERO;

if (!c->page)
goto new_slab;

Expand Down

0 comments on commit e72e9c2

Please sign in to comment.