From e7b81839f59ee212f0c3df0f158d577f5268d194 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 27 Mar 2008 20:56:33 -0700 Subject: [PATCH] Revert "SLUB: remove useless masking of GFP_ZERO" This reverts commit 0f9e4d78cb6a32d568c9a2196007e72ab5698268. 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 --- mm/slub.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mm/slub.c b/mm/slub.c index b72bc98e2dc19..84ed734b96b3e 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; -- 2.39.5