mm: add nommu variant of vm_insert_pages()

Commit 62346c6cb2 upstream.

An identical one exists for vm_insert_page(), add one for
vm_insert_pages() to avoid needing to check for CONFIG_MMU in code using
it.

Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b6690a4172a3f717822cb30a9227da3d7775fc7e)
This commit is contained in:
Jens Axboe 2024-03-16 07:21:43 -06:00 committed by Wang huai
parent bfc71183fa
commit b5d1e33de8
1 changed files with 7 additions and 0 deletions

View File

@ -357,6 +357,13 @@ int vm_insert_page(struct vm_area_struct *vma, unsigned long addr,
}
EXPORT_SYMBOL(vm_insert_page);
int vm_insert_pages(struct vm_area_struct *vma, unsigned long addr,
struct page **pages, unsigned long *num)
{
return -EINVAL;
}
EXPORT_SYMBOL(vm_insert_pages);
int vm_map_pages(struct vm_area_struct *vma, struct page **pages,
unsigned long num)
{