Skip to contentSkip to conversation

fs-proc-base-use-the-vma-iterators-in-place-of-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: fs/proc/base: use the vma iterators in place of linked list
has been removed from the -mm tree. Its filename was
fs-proc-base-use-the-vma-iterators-in-place-of-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: fs/proc/base: use the vma iterators in place of linked list
Date: Tue, 6 Sep 2022 19:48:56 +0000

Use the vma iterator instead of a for loop across the linked list. The link list of vmas will be removed in this patch set.

Cc Catalin Marinas <[email protected]>
Cc David Hildenbrand <[email protected]>
Cc David Howells <[email protected]>
Cc Davidlohr Bueso <[email protected]>
Cc "Matthew Wilcox (Oracle)" <[email protected]>
Cc SeongJae Park <[email protected]>
Cc Sven Schnelle <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Will Deacon <[email protected]>

---

 fs/proc/base.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
fs/proc/base.c renamed from fs/proc/base.c~fs-proc-base-use-the-vma-iterators-in-place-of-linked-list +4 -1
@@ -2350,6 +2350,7 @@ proc_map_files_readdir(struct file *file
 	GENRADIX(struct map_files_info) fa;
 	struct map_files_info *p;
 	int ret;
+	struct vma_iterator vmi;
 
 	genradix_init(&fa);
 
@@ -2388,7 +2389,9 @@ proc_map_files_readdir(struct file *file
 	 * routine might require mmap_lock taken in might_fault().
 	 */
 
-	for (vma = mm->mmap, pos = 2; vma; vma = vma->vm_next) {
+	pos = 2;
+	vma_iter_init(&vmi, mm, 0);
+	for_each_vma(vmi, vma) {
 		if (!vma->vm_file)
 			continue;
 		if (++pos <= ctx->pos)

_

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