// SPDX-License-Identifier: GPL-2.0-only

/* Upstream Linux v6.0: mm/gup.c:2198-2208
 * Exact source lines; kernel context, not a standalone program or book restoration.
 */
long get_user_pages_remote(struct mm_struct *mm,
		unsigned long start, unsigned long nr_pages,
		unsigned int gup_flags, struct page **pages,
		struct vm_area_struct **vmas, int *locked)
{
	if (!is_valid_gup_flags(gup_flags))
		return -EINVAL;

	return __get_user_pages_remote(mm, start, nr_pages, gup_flags,
				       pages, vmas, locked);
}
