]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm/oom_kill: use maple tree iterators instead of vma linked list
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Thu, 14 Apr 2022 06:07:23 +0000 (23:07 -0700)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Tue, 26 Apr 2022 14:36:41 +0000 (10:36 -0400)
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
mm/oom_kill.c

index 7ec38194f8e11c927ab5f9f3b7c89ebab33ef0e7..cc25bd430b68a61d8aa1de0b66ca717406665375 100644 (file)
@@ -513,6 +513,7 @@ bool __oom_reap_task_mm(struct mm_struct *mm)
 {
        struct vm_area_struct *vma;
        bool ret = true;
+       VMA_ITERATOR(vmi, mm, 0);
 
        /*
         * Tell all users of get_user/copy_from_user etc... that the content
@@ -522,7 +523,7 @@ bool __oom_reap_task_mm(struct mm_struct *mm)
         */
        set_bit(MMF_UNSTABLE, &mm->flags);
 
-       for (vma = mm->mmap ; vma; vma = vma->vm_next) {
+       for_each_vma(vmi, vma) {
                if (vma->vm_flags & (VM_HUGETLB|VM_PFNMAP))
                        continue;