2022-08-22 16:01:38

by Liam R. Howlett

[permalink] [raw]
Subject: [PATCH v13 54/70] mm/madvise: use vma_find() instead of vma linked list

From: "Liam R. Howlett" <[email protected]>

madvise_walk_vmas() no longer uses linked list.

Signed-off-by: Liam R. Howlett <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
---
mm/madvise.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/madvise.c b/mm/madvise.c
index af97100a0727..682e1d161aef 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -1242,7 +1242,7 @@ int madvise_walk_vmas(struct mm_struct *mm, unsigned long start,
if (start >= end)
break;
if (prev)
- vma = prev->vm_next;
+ vma = find_vma(mm, prev->vm_end);
else /* madvise_remove dropped mmap_lock */
vma = find_vma(mm, start);
}
--
2.35.1


2022-09-06 18:19:28

by Davidlohr Bueso

[permalink] [raw]
Subject: Re: [PATCH v13 54/70] mm/madvise: use vma_find() instead of vma linked list

On Mon, 22 Aug 2022, Liam Howlett wrote:

>From: "Liam R. Howlett" <[email protected]>
>
>madvise_walk_vmas() no longer uses linked list.
>
>Signed-off-by: Liam R. Howlett <[email protected]>
>Acked-by: Vlastimil Babka <[email protected]>

Reviewed-by: Davidlohr Bueso <[email protected]>