]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
damon: Change vma iterator to mas_for_each
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Thu, 2 Sep 2021 17:45:06 +0000 (13:45 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Thu, 2 Sep 2021 17:45:06 +0000 (13:45 -0400)
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
mm/damon/vaddr.c

index 230db741327861d38123a8cfe942b8d81bec13d2..0a69be31221d8af919f36ce201c6ac9e48a766fd 100644 (file)
@@ -130,9 +130,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;