Skip to contentSkip to conversation

mm-swapfile-use-vma-iterator-instead-of-vma-linked-list.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Sep 27, 2022

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/swapfile: use vma iterator instead of vma linked list
has been removed from the -mm tree. Its filename was
mm-swapfile-use-vma-iterator-instead-of-vma-linked-list.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: "Liam R. Howlett" <[email protected]>
Subject: mm/swapfile: use vma iterator instead of vma linked list
Date: Tue, 6 Sep 2022 19:49:04 +0000

unuse_mm() no longer needs to reference the linked list.

---

 mm/swapfile.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
mm/swapfile.c renamed from mm/swapfile.c~mm-swapfile-use-vma-iterator-instead-of-vma-linked-list +3 -1
@@ -1994,14 +1994,16 @@ static int unuse_mm(struct mm_struct *mm
 {
 	struct vm_area_struct *vma;
 	int ret = 0;
+	VMA_ITERATOR(vmi, mm, 0);
 
 	mmap_read_lock(mm);
-	for (vma = mm->mmap; vma; vma = vma->vm_next) {
+	for_each_vma(vmi, vma) {
 		if (vma->anon_vma) {
 			ret = unuse_vma(vma, type);
 			if (ret)
 				break;
 		}
+
 		cond_resched();
 	}
 	mmap_read_unlock(mm);

_

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