Use set_softleaf_ptes() to store multiple uffd-wp marker entries instead of open coding the batched setting. Signed-off-by: Dev Jain --- mm/memory.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index 7a8442fda0b51..390ea3aefbccb 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -1733,14 +1733,8 @@ bool cond_install_uffd_wp_ptes(struct vm_area_struct *vma, if (likely(!arm_uffd_pte)) return false; - for (;;) { - set_pte_at(vma->vm_mm, addr, ptep, - make_pte_marker(PTE_MARKER_UFFD_WP)); - if (--nr_ptes == 0) - break; - ptep++; - addr += PAGE_SIZE; - } + set_softleaf_ptes(vma->vm_mm, addr, ptep, + make_pte_marker(PTE_MARKER_UFFD_WP), nr_ptes); return true; } -- 2.43.0