]> nv-tegra.nvidia Code Review - linux-3.10.git/commitdiff
slab: remove GFP_THISNODE clearing from alloc_slabmgmt()
authorPekka Enberg <penberg@cs.helsinki.fi>
Wed, 26 Nov 2008 08:01:31 +0000 (10:01 +0200)
committerPekka Enberg <penberg@cs.helsinki.fi>
Mon, 29 Dec 2008 09:40:53 +0000 (11:40 +0200)
Commit 6cb062296f73e74768cca2f3eaf90deac54de02d ("Categorize GFP flags")
left one call-site in alloc_slabmgmt() to clear GFP_THISNODE instead of
GFP_CONSTRAINT_MASK. Unfortunately, that ends up clearing __GFP_NOWARN
and __GFP_NORETRY as well which is not what we want. As the only caller
of alloc_slabmgmt() already clears GFP_CONSTRAINT_MASK before passing
local_flags to it, we can just remove the clearing of GFP_THISNODE.

This patch should fix spurious page allocation failure warnings on the
mempool_alloc() path. See the following URL for the original discussion
of the bug:

  http://lkml.org/lkml/2008/10/27/100

Acked-by: Christoph Lameter <cl@linux-foundation.org>
Reported-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
mm/slab.c

index 09187517f9dc64804cc80453db0be0a72bcbf922..d4b87690b27589ccac812e4b1aeb620f3082e9f0 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2609,7 +2609,7 @@ static struct slab *alloc_slabmgmt(struct kmem_cache *cachep, void *objp,
        if (OFF_SLAB(cachep)) {
                /* Slab management obj is off-slab. */
                slabp = kmem_cache_alloc_node(cachep->slabp_cache,
-                                             local_flags & ~GFP_THISNODE, nodeid);
+                                             local_flags, nodeid);
                if (!slabp)
                        return NULL;
        } else {