lkml.org 
[lkml]   [2021]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 25/70] mm/mmap: Change do_brk_munmap() to use do_mas_align_munmap()
Date
do_brk_munmap() already has aligned addresses.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
---
mm/mmap.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/mm/mmap.c b/mm/mmap.c
index 9be91b47db6b4..f750e85d4dc2c 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -3004,12 +3004,13 @@ static int do_brk_munmap(struct ma_state *mas, struct vm_area_struct *vma,
struct mm_struct *mm = vma->vm_mm;
struct vm_area_struct unmap;
unsigned long unmap_pages;
- int ret = 1;
+ int ret;

arch_unmap(mm, newbrk, oldbrk);

if (likely(vma->vm_start >= newbrk)) { // remove entire mapping(s)
- ret = do_mas_munmap(mas, mm, newbrk, oldbrk-newbrk, uf, true);
+ ret = do_mas_align_munmap(mas, vma, mm, newbrk, oldbrk, uf,
+ true);
goto munmap_full_vma;
}

--
2.28.0
\
 
 \ /
  Last update: 2021-01-12 17:41    [W:0.227 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site