]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
riscv: use vma iterator for vdso
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Wed, 20 Jul 2022 02:18:04 +0000 (02:18 +0000)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Tue, 6 Sep 2022 19:44:26 +0000 (15:44 -0400)
Remove the linked list use in favour of the vma iterator.

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
arch/riscv/kernel/vdso.c

index 69b05b6c181b6d252c6d95d11605b76154619c0c..692e7ae3dcb80b731813b9ce1604ab655d88894b 100644 (file)
@@ -114,11 +114,12 @@ 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);
        struct __vdso_info *vdso_info = mm->context.vdso_info;
 
        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))