Преглед изворни кода

Revert "SLUB: remove useless masking of GFP_ZERO"

This reverts commit 3811dbf67162bd08412f1b0e02e554f353e93bdb.

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>
Linus Torvalds пре 17 година
родитељ
комит
e72e9c23ee
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      mm/slub.c

+ 3 - 0
mm/slub.c

@@ -1470,6 +1470,9 @@ static void *__slab_alloc(struct kmem_cache *s,
 	void **object;
 	void **object;
 	struct page *new;
 	struct page *new;
 
 
+	/* We handle __GFP_ZERO in the caller */
+	gfpflags &= ~__GFP_ZERO;
+
 	if (!c->page)
 	if (!c->page)
 		goto new_slab;
 		goto new_slab;