mm: Don't reinvent the wheel but use existing llist API
Subsystems (2)
PATCH RESEND 1/1 mm: Don't reinvent the wheel but use existing llist API
Although llist provides proper APIs, they are not used. Make them used.
Signed-off-by Byungchul Park <[email protected]>
--- mm/vmalloc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
mm/vmalloc.c +4 -6
@@ -49,12 +49,10 @@ struct vfree_deferred {static void free_work (struct work_struct *w) { struct vfree_deferred *p = container_of(w, struct vfree_deferred, wq); -struct llist_node *llnode =llist_del_all (&p->list); -while (llnode) { -void *p = llnode; - llnode =llist_next (llnode); -__vunmap (p,1 ); - } +struct llist_node *t, *llnode; + +llist_for_each_safe (llnode, t,llist_del_all (&p->list)) +__vunmap ((void *)llnode,1 ); }/*** Page table manipulation functions ***/
Signature · 7 lines
1.9.1 -- 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>