Commit de24baec authored by Wei Yongjun's avatar Wei Yongjun Committed by Linus Torvalds
Browse files

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: default avatarWei Yongjun <>
Acked-by: default avatarDavid Rientjes <>
Acked-by: default avatarChristoph Lameter <>
Cc: Pekka Enberg <>
Cc: Joonsoo Kim <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 91c6a05f
......@@ -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_add(&page->lru, list);
list_move(&page->lru, list);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment