All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] mm/slab: use list_move instead of list_del/list_add
@ 2016-07-19 12:02 ` Wei Yongjun
  0 siblings, 0 replies; 6+ messages in thread
From: Wei Yongjun @ 2016-07-19 12:02 UTC (permalink / raw)
  To: Christoph Lameter, Pekka Enberg, David Rientjes, Joonsoo Kim,
	Andrew Morton
  Cc: Wei Yongjun, linux-mm, linux-kernel

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Using list_move() instead of list_del() + list_add().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 mm/slab.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/mm/slab.c b/mm/slab.c
index 32c2296..cc6d816 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3452,8 +3452,7 @@ static void free_block(struct kmem_cache *cachep, void **objpp,
 		n->free_objects -= cachep->num;
 
 		page = list_last_entry(&n->slabs_free, struct page, lru);
-		list_del(&page->lru);
-		list_add(&page->lru, list);
+		list_move(&page->lru, list);
 	}
 }
 

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

end of thread, other threads:[~2016-07-20  0:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-19 12:02 [PATCH -next] mm/slab: use list_move instead of list_del/list_add Wei Yongjun
2016-07-19 12:02 ` Wei Yongjun
2016-07-19 19:08 ` David Rientjes
2016-07-19 19:08   ` David Rientjes
2016-07-20  0:40 ` Christoph Lameter
2016-07-20  0:40   ` Christoph 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.