Skip to contentSkip to conversation

mm-dont-reinvent-the-wheel-but-use-existing-llist-api.patch removed from -mm tree

merged [email protected] 1 participant 1 message Sep 7, 2017

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm/vmalloc.c: don't reinvent the wheel but use existing llist API
has been removed from the -mm tree. Its filename was
mm-dont-reinvent-the-wheel-but-use-existing-llist-api.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Byungchul Park <[email protected]>
Subject: mm/vmalloc.c: don't reinvent the wheel but use existing llist API

Although llist provides proper APIs, they are not used. Make them used.

---

 mm/vmalloc.c |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
mm/vmalloc.c renamed from mm/vmalloc.c~mm-dont-reinvent-the-wheel-but-use-existing-llist-api +4 -6
diff -puN mm/vmalloc.c~mm-dont-reinvent-the-wheel-but-use-existing-llist-api mm/vmalloc.c
@@ -49,12 +49,10 @@ static void __vunmap(const void *, int);
 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 ***/

_

Patches currently in -mm which might be from [email protected] are