]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mmap: rename unmapped to empty, change comemnts
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Mon, 27 Jul 2020 19:34:58 +0000 (15:34 -0400)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 30 Oct 2020 19:08:51 +0000 (15:08 -0400)
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
mm/mmap.c

index 966f2ab4ac627f9a6027773c98e5e6385aa62252..7002a15e0b00b743c7864ba6ecab6757707279f4 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1878,7 +1878,7 @@ static unsigned long unmapped_area(struct vm_unmapped_area_info *info)
                return -ENOMEM;
 
        rcu_read_lock();
-       if (mas_get_unmapped_area(&mas, info->low_limit, info->high_limit - 1,
+       if (mas_get_empty_area(&mas, info->low_limit, info->high_limit - 1,
                                  length)) {
                rcu_read_unlock();
                return -ENOMEM;
@@ -1909,7 +1909,7 @@ static unsigned long unmapped_area_topdown(struct vm_unmapped_area_info *info)
                return -ENOMEM;
 
        rcu_read_lock();
-       if (mas_get_unmapped_area_rev(&mas, info->low_limit, info->high_limit,
+       if (mas_get_empty_area_rev(&mas, info->low_limit, info->high_limit,
                                length)) {
                rcu_read_unlock();
                return -ENOMEM;
@@ -2098,14 +2098,15 @@ get_unmapped_area(struct file *file, unsigned long addr, unsigned long len,
 
 EXPORT_SYMBOL(get_unmapped_area);
 
-/**
- * find_vma() - Find the VMA for a given address, or the next vma.  May return
- * NULL in the case of no vma at addr or above
+/*
+ * find_vma() - Find the best VMA for a given address.
  * @mm The mm_struct to check
  * @addr: The address
  *
- * Returns: The VMA assoicated with addr, or the next vma.
- * May return NULL in the case of no vma at addr or above.
+ * Searches the user memory map for the VMA which either contains this address
+ * or is the next VMA after this address.
+ *
+ * Returns: The VMA or %NULL if the address is higher than any mapping.
  */
 struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
 {
@@ -2124,15 +2125,17 @@ struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
 }
 EXPORT_SYMBOL(find_vma);
 
-/**
- * find_vma_prev() - Find the VMA for a given address, or the next vma and
- * sets %pprev to the previous VMA, if any.
+/*
+ * find_vma_prev() - Find the best VMA for a given address and the previous VMA.
  * @mm The mm_struct to check
  * @addr: The address
  * @pprev: The pointer to set to the previous VMA
  *
- * Returns: The VMA associated with @addr, or the next vma.
- * May return NULL in the case of no vma at addr or above.
+ * Searches the user memory map for the VMA which either contains this address
+ * or is the next VMA after this address.  Sets %pprev to the previous VMA or
+ * NULL if this is the first VMA.
+ *
+ * Returns: The VMA or %NULL if the address is higher than any mapping.
  */
 struct vm_area_struct *
 find_vma_prev(struct mm_struct *mm, unsigned long addr,