From: Christoph Lameter Date: Mon, 14 Nov 2005 00:06:47 +0000 (-0800) Subject: [PATCH] slab: remove alloc_pages() calls X-Git-Tag: v2.6.15-rc2~187 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=50c85a19e7b3928b5b5188524c44ffcbacdd4e35;p=linux-2.6-omap-h63xx.git [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 Cc: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/slab.c b/mm/slab.c index 15d25ae5b68..e5ec26e0c46 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);