From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx> Subject: mm/slab: use list_move instead of list_del/list_add Using list_move() instead of list_del() + list_add() to avoid needlessly poisoning the next and prev values. Link: http://lkml.kernel.org/r/1468929772-9174-1-git-send-email-weiyj_lk@xxxxxxx Signed-off-by: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx> Acked-by: David Rientjes <rientjes@xxxxxxxxxx> Acked-by: Christoph Lameter <cl@xxxxxxxxx> Cc: Pekka Enberg <penberg@xxxxxxxxxx> Cc: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/slab.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff -puN mm/slab.c~mm-slab-use-list_move-instead-of-list_del-list_add mm/slab.c --- a/mm/slab.c~mm-slab-use-list_move-instead-of-list_del-list_add +++ a/mm/slab.c @@ -3452,8 +3452,7 @@ static void free_block(struct kmem_cache 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); } } _ -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html