mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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/[email protected] Signed-off-by: Wei Yongjun <[email protected]> Acked-by: David Rientjes <[email protected]> Acked-by: Christoph Lameter <[email protected]> Cc: Pekka Enberg <[email protected]> Cc: Joonsoo Kim <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
91c6a05f72
commit
de24baecd7
1 changed files with 1 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue