]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.fixes/slab-alloc_slabmgmt-fix.patch
Imported linux-2.6.27.39 suse/xen patches.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.fixes / slab-alloc_slabmgmt-fix.patch
CommitLineData
2cb7cef9
BS
1From: Pekka Enberg <penberg@cs.helsinki.fi>
2Date: Tue, 25 Nov 2008 00:33:28 +0200
3Subject: slab: remove GFP_THISNODE clearing from alloc_slabmgmt()
4Patch-mainline: 2.6.28?
5References: bnc#444597
6
7Commit 6cb062296f73e74768cca2f3eaf90deac54de02d ("Categorize GFP flags")
8left one call-site in alloc_slabmgmt() to clear GFP_THISNODE instead of
9GFP_CONSTRAINT_MASK. Unfortunately, that ends up clearing __GFP_NOWARN
10and __GFP_NORETRY as well which is not what we want. As the only caller
11of alloc_slabmgmt() already clears GFP_CONSTRAINT_MASK before passing
12local_flags to it, we can just remove the clearing of GFP_THISNODE.
13
14This patch should fix spurious page allocation failure warnings on the
15mempool_alloc() path. See the following URL for an example:
16
17 http://lkml.org/lkml/2008/10/27/100
18
19Reported-by: Miklos Szeredi <miklos@szeredi.hu>
20Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
21Acked-by: Miklos Szeredi <mszeredi@suse.cz>
22---
23 mm/slab.c | 2 +-
24 1 files changed, 1 insertions(+), 1 deletions(-)
25
26diff --git a/mm/slab.c b/mm/slab.c
27index 918f04f..98d3024 100644
28--- a/mm/slab.c
29+++ b/mm/slab.c
30@@ -2608,7 +2608,7 @@ static struct slab *alloc_slabmgmt(struct kmem_cache *cachep, void *objp,
31 if (OFF_SLAB(cachep)) {
32 /* Slab management obj is off-slab. */
33 slabp = kmem_cache_alloc_node(cachep->slabp_cache,
34- local_flags & ~GFP_THISNODE, nodeid);
35+ local_flags, nodeid);
36 if (!slabp)
37 return NULL;
38 } else {