[PATCH v3 61/66] damon: Change vma iterator to mas_for_each
From: Liam Howlett
Date: Mon Oct 04 2021 - 21:34:44 EST
Signed-off-by: Liam R. Howlett <Liam.Howlett@xxxxxxxxxx>
---
mm/damon/vaddr.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mm/damon/vaddr.c b/mm/damon/vaddr.c
index 58c1fb2aafa9..e3b5b5a7948f 100644
--- a/mm/damon/vaddr.c
+++ b/mm/damon/vaddr.c
@@ -132,9 +132,10 @@ static int __damon_va_three_regions(struct vm_area_struct *vma,
struct vm_area_struct *last_vma = NULL;
unsigned long start = 0;
struct rb_root rbroot;
+ MA_STATE(mas, mm->mm_mt, vma->vm_start, vma->vm_start);
/* Find two biggest gaps so that first_gap > second_gap > others */
- for (; vma; vma = vma->vm_next) {
+ mas_for_each(&mas, vma, ULONG_MAX) {
if (!last_vma) {
start = vma->vm_start;
goto next;
--
2.30.2