Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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.com


Signed-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
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -990,10 +990,8 @@ static void cpuup_canceled(long cpu)

		/* cpu is dead; no one can alloc from it. */
		nc = per_cpu_ptr(cachep->cpu_cache, cpu);
		if (nc) {
		free_block(cachep, nc->entry, nc->avail, node, &list);
		nc->avail = 0;
		}

		if (!cpumask_empty(mask)) {
			spin_unlock_irq(&n->list_lock);