From: Christoph Lameter Date: Mon, 14 Nov 2005 00:06:47 +0000 (-0800) Subject: [PATCH] slab: remove alloc_pages() calls X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=50c85a19e7b3928b5b5188524c44ffcbacdd4e35;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.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 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);