[PATCH 78/94] mm/madvise: Use vma_next instead of vma linked list

From: Liam Howlett
Date: Wed Apr 28 2021 - 11:41:22 EST


Signed-off-by: Liam R. Howlett <Liam.Howlett@xxxxxxxxxx>
---
mm/madvise.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/madvise.c b/mm/madvise.c
index 63e489e5bfdb..ce9c738b7663 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -1140,7 +1140,7 @@ int do_madvise(struct mm_struct *mm, unsigned long start, size_t len_in, int beh
if (start >= end)
goto out;
if (prev)
- vma = prev->vm_next;
+ vma = vma_next(mm, prev);
else /* madvise_remove dropped mmap_lock */
vma = find_vma(mm, start);
}
--
2.30.2