From: Liam R. Howlett Date: Wed, 9 Nov 2022 15:22:00 +0000 (-0500) Subject: mmap: Convert vma_link() vma iterator X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=f671de709e00c0a12b38f202c96c3355c1ac548b;p=users%2Fjedix%2Flinux-maple.git mmap: Convert vma_link() vma iterator Avoid using the maple tree interface directly. Signed-off-by: Liam R. Howlett --- diff --git a/mm/mmap.c b/mm/mmap.c index 054dd3e8e1a4..f4568a25d2dd 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -544,10 +544,10 @@ static inline void vma_mas_szero(struct ma_state *mas, unsigned long start, static int vma_link(struct mm_struct *mm, struct vm_area_struct *vma) { - MA_STATE(mas, &mm->mm_mt, 0, 0); + VMA_ITERATOR(vmi, mm, 0); struct address_space *mapping = NULL; - if (mas_preallocate(&mas, vma, GFP_KERNEL)) + if (vma_iter_prealloc(&vmi, vma)) return -ENOMEM; if (vma->vm_file) { @@ -555,7 +555,7 @@ static int vma_link(struct mm_struct *mm, struct vm_area_struct *vma) i_mmap_lock_write(mapping); } - vma_mas_store(vma, &mas); + vma_iter_store(&vmi, vma); if (mapping) { __vma_link_file(vma, mapping);