diff options
author | Liam R. Howlett | 2023-01-20 11:26:11 -0500 |
---|---|---|
committer | Andrew Morton | 2023-02-09 16:51:32 -0800 |
commit | 79e4f2caa4401e56f8df34f658c43bacddc0ae03 (patch) | |
tree | 2e947950a634e9ffb71c8a4f5c87d242f14210a0 /mm | |
parent | 3b9dbd5e91b11911d21effbb80d1976fb21660df (diff) |
mmap: convert vma_link() vma iterator
Avoid using the maple tree interface directly.
Link: https://lkml.kernel.org/r/20230120162650.984577-11-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/mmap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/mmap.c b/mm/mmap.c index 94a477a55109..17de99f31ff5 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -487,10 +487,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, GFP_KERNEL)) + if (vma_iter_prealloc(&vmi)) return -ENOMEM; if (vma->vm_file) { @@ -498,7 +498,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); |