]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/mmap: Reposition vma iterator in mmap_region()
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 25 Jun 2024 17:14:53 +0000 (13:14 -0400)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 23 Aug 2024 12:46:02 +0000 (08:46 -0400)
commit6da0f4e6f67c04b660770dad607df67009cbeaa5
tree1698d7a6ac99a1d91c256d30c5324c8c2b5b82d9
parent25df8d8ec60dd54190fe8866251298676ee5b4d3
mm/mmap: Reposition vma iterator in mmap_region()

Instead of moving (or leaving) the vma iterator pointing at the previous
vma, leave it pointing at the insert location.  Pointing the vma
iterator at the insert location allows for a cleaner walk of the vma
tree for MAP_FIXED and the no expansion cases.

The vma_prev() call in the case of merging the previous vma is
equivalent to vma_iter_prev_range(), since the vma iterator will be
pointing to the location just before the previous vma.

This change needs to export abort_munmap_vmas() from mm/vma.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
mm/mmap.c
mm/vma.c
mm/vma.h