summaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@engr.sgi.com>2005-11-14 01:06:47 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-14 03:14:12 +0100
commit50c85a19e7b3928b5b5188524c44ffcbacdd4e35 (patch)
treea886792eba2e11615c3846bc6b1c77c41ce6dda0 /mm/slab.c
parent[PATCH] slab: convert cache to page mapping macros (diff)
downloadlinux-50c85a19e7b3928b5b5188524c44ffcbacdd4e35.tar.xz
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>
Diffstat (limited to 'mm/slab.c')
-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);