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;
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;
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)
{
}
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,