mm/slab: use list_move instead of list_del/list_add
[email protected]
maintainerPATCH 25/126 mm/slab: use list_move instead of list_del/list_add
From: Wei Yongjun <[email protected]>
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.
Signed-off-by Wei Yongjun <[email protected]>
Acked-by David Rientjes <[email protected]>
Cc Pekka Enberg <[email protected]>
Cc Joonsoo Kim <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
mm/slab.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
mm/slab.c renamed from mm/slab.c~mm-slab-use-list_move-instead-of-list_del-list_add +1 -2
@@ -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); } }
_