/* This function takes a given start page (page aligned user virtual address) and pins it and the following specified number of pages. For now, num_pages is always 1, but that will probably change at some point (because caller is doing expected sends on a single virtually contiguous buffer, so we can do all pages at once).  */
int ipath_get_user_pages(unsigned long start_page, size_t num_pages, struct page **p)
/* This function takes a given start page (page aligned user virtual address) and pins it and the following specified number of pages. For now, num_pages is always 1, but that will probably change at some point (because caller is doing expected sends on a single virtually contiguous buffer, so we can do all pages at once).  */
int ipath_get_user_pages(unsigned long start_page, size_t num_pages, struct page **p)
{
	int ret;
	down_write(&current->mm->mmap_sem);
	ret = __get_user_pages(start_page, num_pages, p, NULL);
	up_write(&current->mm->mmap_sem);
	return ret;
}