From: Liam R. Howlett Date: Thu, 14 Apr 2022 06:07:24 +0000 (-0700) Subject: riscv: use vma iterator for vdso X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ea770166ea7155abde191282e9f4638945846245;p=users%2Fjedix%2Flinux-maple.git riscv: use vma iterator for vdso Remove the linked list use in favour of the vma iterator. Signed-off-by: Liam R. Howlett --- diff --git a/arch/riscv/kernel/vdso.c b/arch/riscv/kernel/vdso.c index a9436a65161a4..20e2ae135fb9f 100644 --- a/arch/riscv/kernel/vdso.c +++ b/arch/riscv/kernel/vdso.c @@ -116,10 +116,11 @@ int vdso_join_timens(struct task_struct *task, struct time_namespace *ns) { struct mm_struct *mm = task->mm; struct vm_area_struct *vma; + VMA_ITERATOR(vmi, mm, 0); mmap_read_lock(mm); - for (vma = mm->mmap; vma; vma = vma->vm_next) { + for_each_vma(vmi, vma) { unsigned long size = vma->vm_end - vma->vm_start; if (vma_is_special_mapping(vma, vdso_info.dm))