mm/slab: use list_move instead of list_del/list_add
PATCH 1/1 mm/slab: use list_move instead of list_del/list_add
From: Wei Yongjun <[email protected]>
Using list_move() instead of list_del() + list_add().
--- mm/slab.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
mm/slab.c +1 -2
@@ -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); } }
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 4 lines · Wei Yongjun
From: Wei Yongjun <[email protected]>
Using
list_move()instead oflist_del()+list_add().
... to prevent needlessly poisoning the next and prev values.
Quoted 1 line
Signed-off-by Wei Yongjun <[email protected]>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>