[PATCH v3 62/66] powerpc: Use maple tree iterator for vdso.

From: Liam Howlett
Date: Mon Oct 04 2021 - 21:35:03 EST


remove vma->vm_next and use the maple tree mas_for_each iterator.

Signed-off-by: Liam R. Howlett <Liam.Howlett@xxxxxxxxxx>
---
arch/powerpc/kernel/vdso.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index 717f2c9a7573..2cf975a1fe54 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -114,11 +114,11 @@ struct vdso_data *arch_get_vdso_data(void *vvar_page)
int vdso_join_timens(struct task_struct *task, struct time_namespace *ns)
{
struct mm_struct *mm = task->mm;
+ MA_STATE(mas, &mm->mm_mt, 0, 0);
struct vm_area_struct *vma;

mmap_read_lock(mm);
-
- for (vma = mm->mmap; vma; vma = vma->vm_next) {
+ mas_for_each(&mas, vma, ULONG_MAX) {
unsigned long size = vma->vm_end - vma->vm_start;

if (vma_is_special_mapping(vma, &vvar_spec))
--
2.30.2