Skip to contentSkip to conversation

mmap-change-do_mas_munmap-and-do_mas_aligned_munmap-to-use-vma-iterator.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Feb 10, 2023

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mmap: change do_mas_munmap and do_mas_aligned_munmap() to use vma iterator
has been removed from the -mm tree. Its filename was
mmap-change-do_mas_munmap-and-do_mas_aligned_munmap-to-use-vma-iterator.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: mmap: change do_mas_munmap and do_mas_aligned_munmap() to use vma iterator
Date: Fri, 20 Jan 2023 11:26:13 -0500

Start passing the vma iterator through the mm code. This will allow for reuse of the state and cleaner invalidation if necessary.

---

 include/linux/mm.h |    2 -
 mm/mmap.c          |   77 +++++++++++++++++++------------------------
 mm/mremap.c        |    6 +--
 3 files changed, 39 insertions(+), 46 deletions(-)
include/linux/mm.h renamed from include/linux/mm.h~mmap-change-do_mas_munmap-and-do_mas_aligned_munmap-to-use-vma-iterator +1 -1
@@ -2905,7 +2905,7 @@ extern unsigned long mmap_region(struct
 extern unsigned long do_mmap(struct file *file, unsigned long addr,
 	unsigned long len, unsigned long prot, unsigned long flags,
 	unsigned long pgoff, unsigned long *populate, struct list_head *uf);
-extern int do_mas_munmap(struct ma_state *mas, struct mm_struct *mm,
+extern int do_vmi_munmap(struct vma_iterator *vmi, struct mm_struct *mm,
 			 unsigned long start, size_t len, struct list_head *uf,
 			 bool downgrade);
 extern int do_munmap(struct mm_struct *, unsigned long, size_t,
mm/mmap.c renamed from mm/mmap.c~mmap-change-do_mas_munmap-and-do_mas_aligned_munmap-to-use-vma-iterator +35 -42

241 lines not on this page · raw message

mm/mremap.c renamed from mm/mremap.c~mmap-change-do_mas_munmap-and-do_mas_aligned_munmap-to-use-vma-iterator +3 -3
@@ -978,14 +978,14 @@ SYSCALL_DEFINE5(mremap, unsigned long, a
 	/*
 	 * Always allow a shrinking remap: that just unmaps
 	 * the unnecessary pages..
-	 * do_mas_munmap does all the needed commit accounting, and
+	 * do_vmi_munmap does all the needed commit accounting, and
 	 * downgrades mmap_lock to read if so directed.
 	 */
 	if (old_len >= new_len) {
 		int retval;
-		MA_STATE(mas, &mm->mm_mt, addr + new_len, addr + new_len);
+		VMA_ITERATOR(vmi, mm, addr + new_len);
 
-		retval = do_mas_munmap(&mas, mm, addr + new_len,
+		retval = do_vmi_munmap(&vmi, mm, addr + new_len,
 				       old_len - new_len, &uf_unmap, true);
 		/* Returning 1 indicates mmap_lock is downgraded to read. */
 		if (retval == 1) {

_

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