From: Wei Yongjun Date: Tue, 26 Jul 2016 22:22:11 +0000 (-0700) Subject: mm/slab: use list_move instead of list_del/list_add X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=de24baecd7628aa19e8b53530bb33f8ffbaf5220;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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@163.com Signed-off-by: Wei Yongjun Acked-by: David Rientjes Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/slab.c b/mm/slab.c index fc9496bdd038..09771ed3e693 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); } }