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 18/70] mm/mmap: Drop munmap_vma_range()
Date
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
---
mm/mmap.c | 23 -----------------------
1 file changed, 23 deletions(-)

diff --git a/mm/mmap.c b/mm/mmap.c
index d3dfea031c0d5..1cef158c31909 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -483,29 +483,6 @@ static inline struct vm_area_struct *vma_next(struct mm_struct *mm,
return vma->vm_next;
}

-/*
- * munmap_vma_range() - munmap VMAs that overlap a range.
- * @mm: The mm struct
- * @start: The start of the range.
- * @len: The length of the range.
- * @pprev: pointer to the pointer that will be set to previous vm_area_struct
- *
- * Find all the vm_area_struct that overlap from @start to
- * @end and munmap them. Set @pprev to the previous vm_area_struct.
- *
- * Returns: -ENOMEM on munmap failure or 0 on success.
- */
-static inline int
-munmap_vma_range(struct mm_struct *mm, unsigned long start, unsigned long len,
- struct vm_area_struct **pprev, struct list_head *uf)
-{
- // Needs optimization.
- while (range_has_overlap(mm, start, start + len, pprev)) {
- if (do_munmap(mm, start, len, uf))
- return -ENOMEM;
- }
- return 0;
-}
static unsigned long count_vma_pages_range(struct mm_struct *mm,
unsigned long addr, unsigned long end)
{
--
2.28.0
\
 
 \ /
  Last update: 2021-01-12 17:41    [W:0.273 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site