[PATCH v4 33/66] xtensa: Remove vma linked list walks
Liam Howlett
liam.howlett at oracle.com
Wed Dec 1 06:30:06 PST 2021
From: "Liam R. Howlett" <Liam.Howlett at Oracle.com>
Use the VMA iterator instead.
Signed-off-by: Matthew Wilcox (Oracle) <willy at infradead.org>
Signed-off-by: Liam R. Howlett <Liam.Howlett at Oracle.com>
---
arch/xtensa/kernel/syscall.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/xtensa/kernel/syscall.c b/arch/xtensa/kernel/syscall.c
index 201356faa7e6..20ec9534e01f 100644
--- a/arch/xtensa/kernel/syscall.c
+++ b/arch/xtensa/kernel/syscall.c
@@ -58,6 +58,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
unsigned long len, unsigned long pgoff, unsigned long flags)
{
struct vm_area_struct *vmm;
+ VMA_ITERATOR(vmi, mm, addr);
if (flags & MAP_FIXED) {
/* We do not accept a shared mapping if it would violate
@@ -79,7 +80,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
else
addr = PAGE_ALIGN(addr);
- for (vmm = find_vma(current->mm, addr); ; vmm = vmm->vm_next) {
+ for_each_vma(vmi, vmm) {
/* At this point: (!vmm || addr < vmm->vm_end). */
if (TASK_SIZE - len < addr)
return -ENOMEM;
--
2.30.2
More information about the maple-tree
mailing list