diff options
author | Li RongQing <[email protected]> | 2019-05-13 17:16:25 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2019-05-14 09:47:45 -0700 |
commit | 517f9f1ee5ed0a05d0f6f884f6d9b5c46ac5a810 (patch) | |
tree | 4d697c043807115551b7598f81898b83be97f354 | |
parent | a4d3f8916c65b63e6b9457cdec74ceaaff7e6b12 (diff) |
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/[email protected]
Signed-off-by: Li RongQing <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Acked-by: Christoph Lameter <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | mm/slab.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mm/slab.c b/mm/slab.c index e9eaa8fce231..da4068a95307 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -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; - } + free_block(cachep, nc->entry, nc->avail, node, &list); + nc->avail = 0; if (!cpumask_empty(mask)) { spin_unlock_irq(&n->list_lock); |