mm/pagewalk: use vma_find() instead of vma linked list
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 6 Sep 2022 19:49:04 +0000 (19:49 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 27 Sep 2022 02:46:25 +0000 (19:46 -0700)
walk_page_range() no longer uses the one vma linked list reference.

Link: https://lkml.kernel.org/r/20220906194824.2110408-63-Liam.Howlett@oracle.com
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Tested-by: Yu Zhao <yuzhao@google.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: SeongJae Park <sj@kernel.org>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/pagewalk.c

index 908ec15..131b2b3 100644 (file)
@@ -456,7 +456,7 @@ int walk_page_range(struct mm_struct *mm, unsigned long start,
                } else { /* inside vma */
                        walk.vma = vma;
                        next = min(end, vma->vm_end);
-                       vma = vma->vm_next;
+                       vma = find_vma(mm, vma->vm_end);
 
                        err = walk_page_test(start, next, &walk);
                        if (err > 0) {