[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201210170402.3468568-16-Liam.Howlett@Oracle.com>
Date: Thu, 10 Dec 2020 12:03:49 -0500
From: "Liam R. Howlett" <Liam.Howlett@...cle.com>
To: maple-tree@...ts.infradead.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Cc: Andrew Morton <akpm@...gle.com>, Song Liu <songliubraving@...com>,
Davidlohr Bueso <dave@...olabs.net>,
"Paul E . McKenney" <paulmck@...nel.org>,
Matthew Wilcox <willy@...radead.org>,
Jerome Glisse <jglisse@...hat.com>,
David Rientjes <rientjes@...gle.com>,
Axel Rasmussen <axelrasmussen@...gle.com>,
Suren Baghdasaryan <surenb@...gle.com>,
Vlastimil Babka <vbabka@...e.cz>
Subject: [PATCH 15/28] mm/mmap: Change vm_brk_flags() to use mm_populate_vma()
Skip searching for the vma to populate after creating it by passing in a pointer.
Signed-off-by: Liam R. Howlett <Liam.Howlett@...cle.com>
---
mm/mmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/mmap.c b/mm/mmap.c
index ec2e92b03f9d1..dc7a742fbe131 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -3026,10 +3026,10 @@ int vm_brk_flags(unsigned long addr, unsigned long request, unsigned long flags)
// This vma left intentionally blank.
mas_walk(&mas);
ret = do_brk_flags(&mas, &vma, addr, len, flags);
- populate = ((mm->def_flags & VM_LOCKED) != 0);
mmap_write_unlock(mm);
+ populate = ((mm->def_flags & VM_LOCKED) != 0);
if (populate && !ret)
- mm_populate(addr, len);
+ mm_populate_vma(vma, addr, addr + len);
return ret;
}
EXPORT_SYMBOL(vm_brk_flags);
--
2.28.0
Powered by blists - more mailing lists