lkml.org 
[lkml]   [2021]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v4 50/66] mm/gup: Use maple tree navigation instead of linked list
Date
From: "Liam R. Howlett" <Liam.Howlett@Oracle.com>

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
---
mm/gup.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/mm/gup.c b/mm/gup.c
index 2c51e9748a6a..60892e5df6a2 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -1570,7 +1570,6 @@ int __mm_populate(unsigned long start, unsigned long len, int ignore_errors)
long ret = 0;

end = start + len;
-
for (nstart = start; nstart < end; nstart = nend) {
/*
* We want to fault in pages for [nstart; end) address range.
@@ -1579,10 +1578,10 @@ int __mm_populate(unsigned long start, unsigned long len, int ignore_errors)
if (!locked) {
locked = 1;
mmap_read_lock(mm);
- vma = find_vma(mm, nstart);
+ vma = find_vma_intersection(mm, start, end);
} else if (nstart >= vma->vm_end)
- vma = vma->vm_next;
- if (!vma || vma->vm_start >= end)
+ vma = find_vma(mm, vma->vm_end);
+ if (!vma)
break;
/*
* Set [nstart; nend) to intersection of desired address
--
2.30.2
\
 
 \ /
  Last update: 2021-12-01 15:39    [W:1.766 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site