Commit 517f9f1e authored by Li RongQing's avatar Li RongQing Committed by Linus Torvalds

mm/slab.c: remove unneed check in cpuup_canceled

nc is a member of percpu allocation memory, and cannot be NULL.

Link: http://lkml.kernel.org/r/1553159353-5056-1-git-send-email-lirongqing@baidu.comSigned-off-by: default avatarLi RongQing <lirongqing@baidu.com>
Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Acked-by: default avatarChristoph 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a4d3f891
...@@ -990,10 +990,8 @@ static void cpuup_canceled(long cpu) ...@@ -990,10 +990,8 @@ static void cpuup_canceled(long cpu)
/* cpu is dead; no one can alloc from it. */ /* cpu is dead; no one can alloc from it. */
nc = per_cpu_ptr(cachep->cpu_cache, cpu); nc = per_cpu_ptr(cachep->cpu_cache, cpu);
if (nc) { free_block(cachep, nc->entry, nc->avail, node, &list);
free_block(cachep, nc->entry, nc->avail, node, &list); nc->avail = 0;
nc->avail = 0;
}
if (!cpumask_empty(mask)) { if (!cpumask_empty(mask)) {
spin_unlock_irq(&n->list_lock); spin_unlock_irq(&n->list_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment