]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
arch/powerpc: Remove mmap linked list from mm/book2s32/subpage_prot
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Mon, 4 Jan 2021 19:26:34 +0000 (14:26 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Thu, 28 Jan 2021 02:00:45 +0000 (21:00 -0500)
Start using the maple tree

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
arch/powerpc/mm/book3s64/subpage_prot.c

index 60c6ea16a972afc6e26bd615bd3eba2968c1a8a8..ada1531f81be999e390055fb2314da3575d581fb 100644 (file)
@@ -149,24 +149,15 @@ static void subpage_mark_vma_nohuge(struct mm_struct *mm, unsigned long addr,
                                    unsigned long len)
 {
        struct vm_area_struct *vma;
+       MA_STATE(mas, &mm->mm_mt, addr, addr);
 
        /*
         * We don't try too hard, we just mark all the vma in that range
         * VM_NOHUGEPAGE and split them.
         */
-       vma = find_vma(mm, addr);
-       /*
-        * If the range is in unmapped range, just return
-        */
-       if (vma && ((addr + len) <= vma->vm_start))
-               return;
-
-       while (vma) {
-               if (vma->vm_start >= (addr + len))
-                       break;
+       mas_for_each(&mas, vma, addr + len) {
                vma->vm_flags |= VM_NOHUGEPAGE;
                walk_page_vma(vma, &subpage_walk_ops, NULL);
-               vma = vma->vm_next;
        }
 }
 #else