Skip to content

Commit

Permalink
um: remove vma linked list walk
Browse files Browse the repository at this point in the history
Use the VMA iterator instead.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: Alexandre Frade <kernel@xanmod.org>
  • Loading branch information
Matthew Wilcox (Oracle) authored and xanmod committed Oct 3, 2022
1 parent 23e102b commit a057c37
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions arch/um/kernel/tlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,21 +584,19 @@ void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start,

void flush_tlb_mm(struct mm_struct *mm)
{
struct vm_area_struct *vma = mm->mmap;
struct vm_area_struct *vma;
VMA_ITERATOR(vmi, mm, 0);

while (vma != NULL) {
for_each_vma(vmi, vma)
fix_range(mm, vma->vm_start, vma->vm_end, 0);
vma = vma->vm_next;
}
}

void force_flush_all(void)
{
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma = mm->mmap;
struct vm_area_struct *vma;
VMA_ITERATOR(vmi, mm, 0);

while (vma != NULL) {
for_each_vma(vmi, vma)
fix_range(mm, vma->vm_start, vma->vm_end, 1);
vma = vma->vm_next;
}
}

0 comments on commit a057c37

Please sign in to comment.