From: Linus Torvalds Date: Fri, 28 Mar 2008 03:56:33 +0000 (-0700) Subject: Revert "SLUB: remove useless masking of GFP_ZERO" X-Git-Tag: firefly_0821_release~21847 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e72e9c23ee025a4c063ca112ba0a6059f9ecc9b7;p=firefly-linux-kernel-4.4.55.git 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 --- diff --git a/mm/slub.c b/mm/slub.c index b72bc98e2dc1..84ed734b96b3 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -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;