mm/slub.c: remove a redundant assignment in ___slab_alloc()
authorWei Yang <richard.weiyang@gmail.com>
Thu, 6 Jul 2017 22:36:22 +0000 (15:36 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 6 Jul 2017 23:24:30 +0000 (16:24 -0700)
When the code comes to this point, there are two cases:
1. cpu_slab is deactivated
2. cpu_slab is empty

In both cased, cpu_slab->freelist is NULL at this moment.

This patch removes the redundant assignment of cpu_slab->freelist.

Link: http://lkml.kernel.org/r/20170507031215.3130-1-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/slub.c

index 8addc535bcdc58794fe40e72a729e4589d44d2b6..b6b637503d7765800799b7d2a715ec034f29359c 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2572,7 +2572,6 @@ new_slab:
                page = c->page = c->partial;
                c->partial = page->next;
                stat(s, CPU_PARTIAL_ALLOC);
-               c->freelist = NULL;
                goto redo;
        }