From 50c85a19e7b3928b5b5188524c44ffcbacdd4e35 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Sun, 13 Nov 2005 16:06:47 -0800 Subject: [PATCH] [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 --- mm/slab.c | 6 +----- 1 file changed, 1 insertion(+), 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); -- GitLab