]> 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>
Mon, 4 Jan 2021 20:06:25 +0000 (15:06 -0500)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Mon, 14 Mar 2022 18:49:47 +0000 (14:49 -0400)
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
mm/oom_kill.c

index 832fb330376efe9f509045516a72d795af5e39a8..9cbc05fa356c08b737c0c7c5276e02e6097b8fac 100644 (file)
@@ -516,6 +516,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
@@ -525,7 +526,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 (!can_madv_lru_vma(vma))
                        continue;