Remote alloc_pages() from slab allocator 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 Index: linux-2.6.14-mm1/mm/slab.c =================================================================== --- linux-2.6.14-mm1.orig/mm/slab.c 2005-11-10 11:06:34.000000000 -0800 +++ linux-2.6.14-mm1/mm/slab.c 2005-11-10 11:41:15.000000000 -0800 @@ -1193,11 +1194,7 @@ static void *kmem_getpages(kmem_cache_t 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);