]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mmap: change zeroing of maple tree in __vma_adjust()
authorLiam Howlett <liam.howlett@oracle.com>
Thu, 14 Apr 2022 06:07:15 +0000 (23:07 -0700)
committerakpm <akpm@linux-foundation.org>
Thu, 14 Apr 2022 06:07:15 +0000 (23:07 -0700)
commitb1357c01ba2e71f3bb645a1dbd51a818f5f702ab
tree693def37017ee98ae7cac50719bdb1f6af4d34c4
parent7e69f18ec7697c41332aead283d0f8947fd5d29e
mmap: change zeroing of maple tree in __vma_adjust()

Only write to the maple tree if we are not inserting or the insert isn't
going to overwrite the area to clear.  This avoids spanning writes and
node coealescing when unnecessary.

The change requires a custom search for the linked list addition to find
the correct VMA for the prev link.

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