nommu: pass through vma iterator to shrink_vma()
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Fri, 20 Jan 2023 16:26:29 +0000 (11:26 -0500)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 10 Feb 2023 00:51:35 +0000 (16:51 -0800)
commit07f1bc5ad7983356ca79c65b22148dc5700a24e5
tree810d805633e1c6275f5ae6e096082169cd655b96
parent47d9644de92c1aa9dcd791203397b161c67096ca
nommu: pass through vma iterator to shrink_vma()

Rename the function to vmi_shrink_vma() indicate it takes the vma
iterator.  Use the iterator to preallocate and drop the delete function.
The maple tree is able to do the modification easier than the linked list
and rbtree, so just clear the necessary area in the tree.

add_vma_to_mm() is no longer used, so drop this function.

vmi_add_vma_to_mm() is now only used once, so inline this function into
do_mmap().

Link: https://lkml.kernel.org/r/20230120162650.984577-29-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/nommu.c