]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: Use vma_iter_next_range() in mmap_region()
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Mon, 24 Apr 2023 15:33:47 +0000 (11:33 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Mon, 24 Apr 2023 20:20:43 +0000 (16:20 -0400)
commit899d9400c9f1e05539861f2fb9e0adf5806af6b9
tree9523f589aa88b6629f0fe54b01ea2bd993cdb183
parentb914292fc96e2b5b06d2601171aee4382b9a0317
mm: Use vma_iter_next_range() in mmap_region()

When checking the surrounding VMAs, the VMA iterator is moved to the
previous VMA. If they can merge, then the VMA iterator is in the correct
position.  If they are not, then the iterator needs to be moved back to
the gap that will be filled.  Use vma_iter_next_range() to move the
iterator to the next range instead of re-walking the VMA tree.

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
mm/mmap.c