All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm, slab: remove unneed check in cpuup_canceled
@ 2019-03-21  9:09 Li RongQing
  2019-03-22 17:38   ` Christopher Lameter
  0 siblings, 1 reply; 3+ messages in thread
From: Li RongQing @ 2019-03-21  9:09 UTC (permalink / raw)
  To: linux-mm, linux-kernel
  Cc: Andrew Morton, Joonsoo Kim, David Rientjes, Pekka Enberg,
	Christoph Lameter

nc is a member of percpu allocation memory, and impossible NULL

Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
 mm/slab.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/mm/slab.c b/mm/slab.c
index 28652e4218e0..f1420e14875a 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);
-- 
2.16.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm, slab: remove unneed check in cpuup_canceled
  2019-03-21  9:09 [PATCH] mm, slab: remove unneed check in cpuup_canceled Li RongQing
@ 2019-03-22 17:38   ` Christopher Lameter
  0 siblings, 0 replies; 3+ messages in thread
From: Christopher Lameter @ 2019-03-22 17:38 UTC (permalink / raw)
  To: Li RongQing
  Cc: linux-mm, linux-kernel, Andrew Morton, Joonsoo Kim,
	David Rientjes, Pekka Enberg

On Thu, 21 Mar 2019, Li RongQing wrote:

> nc is a member of percpu allocation memory, and impossible NULL

Acked-by: Christoph Lameter <cl@linux.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm, slab: remove unneed check in cpuup_canceled
@ 2019-03-22 17:38   ` Christopher Lameter
  0 siblings, 0 replies; 3+ messages in thread
From: Christopher Lameter @ 2019-03-22 17:38 UTC (permalink / raw)
  To: Li RongQing
  Cc: linux-mm, linux-kernel, Andrew Morton, Joonsoo Kim,
	David Rientjes, Pekka Enberg

On Thu, 21 Mar 2019, Li RongQing wrote:

> nc is a member of percpu allocation memory, and impossible NULL

Acked-by: Christoph Lameter <cl@linux.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-03-22 17:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-21  9:09 [PATCH] mm, slab: remove unneed check in cpuup_canceled Li RongQing
2019-03-22 17:38 ` Christopher Lameter
2019-03-22 17:38   ` Christopher Lameter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.