]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm/mmap: change do_brk_munmap() to use do_mas_align_munmap()
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Wed, 20 Jul 2022 02:17:53 +0000 (02:17 +0000)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Tue, 6 Sep 2022 19:44:23 +0000 (15:44 -0400)
do_brk_munmap() has already aligned the address and has a maple tree state
to be used.  Use the new do_mas_align_munmap() to avoid unnecessary
alignment and error checks.

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

index 6e587f4e3a7da50aadaff9c049e971a0b7cb4e87..8b7e9d5afd38c130b3510e92ce800bc8b888e8f4 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -3042,7 +3042,7 @@ static int do_brk_munmap(struct ma_state *mas, struct vm_area_struct *vma,
        int ret;
 
        arch_unmap(mm, newbrk, oldbrk);
-       ret = do_mas_munmap(mas, mm, newbrk, oldbrk-newbrk, uf, true);
+       ret = do_mas_align_munmap(mas, vma, mm, newbrk, oldbrk, uf, true);
        validate_mm_mt(mm);
        return ret;
 }