From: Christoph Lameter Date: Tue, 17 May 2011 21:29:31 +0000 (-0500) Subject: slub: Remove node check in slab_free X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=442b06bcea23a01934d3da7ec5898fa154a6cafb;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git slub: Remove node check in slab_free We can set the page pointing in the percpu structure to NULL to have the same effect as setting c->node to NUMA_NO_NODE. Gets rid of one check in slab_free() that was only used for forcing the slab_free to the slowpath for debugging. We still need to set c->node to NUMA_NO_NODE to force the slab_alloc() fastpath to the slowpath in case of debugging. Signed-off-by: Christoph Lameter Signed-off-by: Pekka Enberg --- diff --git a/mm/slub.c b/mm/slub.c index 9f7bb93e17e..9ee6f515736 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1881,6 +1881,8 @@ debug: page->inuse++; page->freelist = get_freepointer(s, object); + deactivate_slab(s, c); + c->page = NULL; c->node = NUMA_NO_NODE; goto unlock_out; } @@ -2112,7 +2114,7 @@ redo: tid = c->tid; barrier(); - if (likely(page == c->page && c->node != NUMA_NO_NODE)) { + if (likely(page == c->page)) { set_freepointer(s, object, c->freelist); if (unlikely(!this_cpu_cmpxchg_double(