[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220719191352.3366482-4-Liam.Howlett@oracle.com>
Date: Tue, 19 Jul 2022 19:14:02 +0000
From: Liam Howlett <liam.howlett@...cle.com>
To: "maple-tree@...ts.infradead.org" <maple-tree@...ts.infradead.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Hugh Dickins <hughd@...gle.com>
CC: Yu Zhao <yuzhao@...gle.com>
Subject: [PATCH 3/3] mm/mmap: change do_brk_munmap() to use
From: "Liam R. Howlett" <Liam.Howlett@...cle.com>
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.
Link: https://lkml.kernel.org/r/20220504011345.662299-14-Liam.Howlett@oracle.com
Link: https://lkml.kernel.org/r/20220519150509.1290067-1-Liam.Howlett@oracle.com
Link: https://lkml.kernel.org/r/20220621204632.3370049-30-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@...cle.com>
Cc: Catalin Marinas <catalin.marinas@....com>
Cc: David Howells <dhowells@...hat.com>
Cc: "Matthew Wilcox (Oracle)" <willy@...radead.org>
Cc: SeongJae Park <sj@...nel.org>
Cc: Vlastimil Babka <vbabka@...e.cz>
Cc: Will Deacon <will@...nel.org>
Cc: Davidlohr Bueso <dave@...olabs.net>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
---
mm/mmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/mmap.c b/mm/mmap.c
index ddd5040ecc9f..10ea2f146d4f 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -3085,7 +3085,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;
}
--
2.35.1
Powered by blists - more mailing lists