lkml.org 
[lkml]   [2022]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v13 66/70] riscv: use vma iterator for vdso
    Date
    From: "Liam R. Howlett" <Liam.Howlett@Oracle.com>

    Remove the linked list use in favour of the vma iterator.

    Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
    ---
    arch/riscv/kernel/vdso.c | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    diff --git a/arch/riscv/kernel/vdso.c b/arch/riscv/kernel/vdso.c
    index 69b05b6c181b..692e7ae3dcb8 100644
    --- a/arch/riscv/kernel/vdso.c
    +++ b/arch/riscv/kernel/vdso.c
    @@ -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))
    --
    2.35.1
    \
     
     \ /
      Last update: 2022-08-22 17:13    [W:2.738 / U:0.056 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site