diff options
author | Liam R. Howlett <Liam.Howlett@Oracle.com> | 2023-01-20 11:26:13 -0500 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-02-09 16:51:32 -0800 |
commit | 183654ce26a5d5bd7bc11bcb02e8086f02f66d7d (patch) | |
tree | eece923de2a341ce94248ed603dfab4ad3011366 /mm/mremap.c | |
parent | 0378c0a0e9e463b9e31b94fbbbc10f94b34225b6 (diff) | |
download | lwn-183654ce26a5d5bd7bc11bcb02e8086f02f66d7d.tar.gz lwn-183654ce26a5d5bd7bc11bcb02e8086f02f66d7d.zip |
mmap: change do_mas_munmap and do_mas_aligned_munmap() to use vma iterator
Start passing the vma iterator through the mm code. This will allow for
reuse of the state and cleaner invalidation if necessary.
Link: https://lkml.kernel.org/r/20230120162650.984577-13-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/mremap.c')
-rw-r--r-- | mm/mremap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/mremap.c b/mm/mremap.c index 05f90f47e149..3cc64c3f8bdb 100644 --- a/mm/mremap.c +++ b/mm/mremap.c @@ -978,14 +978,14 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len, /* * 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) { |