summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@engr.sgi.com>2005-11-13 16:06:47 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-13 18:14:12 -0800
commit50c85a19e7b3928b5b5188524c44ffcbacdd4e35 (patch)
treea886792eba2e11615c3846bc6b1c77c41ce6dda0
parent065d41cb269e9debb18c6d5052e4de1088ae3d8f (diff)
downloadblackbird-op-linux-50c85a19e7b3928b5b5188524c44ffcbacdd4e35.tar.gz
blackbird-op-linux-50c85a19e7b3928b5b5188524c44ffcbacdd4e35.zip
[PATCH] slab: remove alloc_pages() calls
The slab allocator never uses alloc_pages since kmem_getpages() is always called with a valid nodeid. Remove the branch and the code from kmem_getpages() Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Manfred Spraul <manfred@colorfullife.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--mm/slab.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 15d25ae5b686..e5ec26e0c460 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1205,11 +1205,7 @@ static void *kmem_getpages(kmem_cache_t *cachep, gfp_t flags, int nodeid)
int i;
flags |= cachep->gfpflags;
- if (likely(nodeid == -1)) {
- page = alloc_pages(flags, cachep->gfporder);
- } else {
- page = alloc_pages_node(nodeid, flags, cachep->gfporder);
- }
+ page = alloc_pages_node(nodeid, flags, cachep->gfporder);
if (!page)
return NULL;
addr = page_address(page);
OpenPOWER on IntegriCloud