From: Liam R. Howlett Date: Thu, 17 Sep 2020 18:06:13 +0000 (-0400) Subject: mmap: Remove __vma_link in favour of calling vma_mt_store directly X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=41259449e4e23530fea50e56acb5a0956ec98f14;p=users%2Fjedix%2Flinux-maple.git mmap: Remove __vma_link in favour of calling vma_mt_store directly Signed-off-by: Liam R. Howlett --- diff --git a/mm/mmap.c b/mm/mmap.c index edbc9fded35ef..129f4adc3af5e 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -56,7 +56,6 @@ #include #include "internal.h" -extern void mtree_direct_destroy(struct maple_tree *mt); #ifndef arch_mmap_check #define arch_mmap_check(addr, len, flags) (0) @@ -606,23 +605,6 @@ static inline void vma_mt_store(struct mm_struct *mm, struct vm_area_struct *vma mtree_store_range(&mm->mm_mt, vma->vm_start, vma->vm_end - 1, vma, GFP_KERNEL); } -/* External interface to store a vma into an @mm. Used in fork. - * - * @mm: The struct_mm - * @vma: The vm_area_struct to store in the maple tree. - */ -void vma_store(struct mm_struct *mm, struct vm_area_struct *vma) -{ - vma_mt_store(mm, vma); -} - -static void -__vma_link(struct mm_struct *mm, struct vm_area_struct *vma, - struct vm_area_struct *prev) -{ - vma_mt_store(mm, vma); - __vma_link_list(mm, vma, prev); -} static void vma_link(struct mm_struct *mm, struct vm_area_struct *vma, struct vm_area_struct *prev) @@ -634,7 +616,8 @@ static void vma_link(struct mm_struct *mm, struct vm_area_struct *vma, i_mmap_lock_write(mapping); } - __vma_link(mm, vma, prev); + vma_mt_store(mm, vma); + __vma_link_list(mm, vma, prev); __vma_link_file(vma); if (mapping) @@ -654,7 +637,8 @@ static void __insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma) if (range_has_overlap(mm, vma->vm_start, vma->vm_end, &prev)) BUG(); - __vma_link(mm, vma, prev); + vma_mt_store(mm, vma); + __vma_link_list(mm, vma, prev); mm->map_count++; }