/* At what user virtual address is page expected in vma? checking that the page matches the vma.  */
unsigned long page_address_in_vma(struct page *page, struct vm_area_struct *vma)
/* At what user virtual address is page expected in vma? checking that the page matches the vma.  */
unsigned long page_address_in_vma(struct page *page, struct vm_area_struct *vma)
{
	if (PageAnon(page)) {
		if (vma->anon_vma != page_anon_vma(page))
			return -EFAULT;
	} else if (page->mapping && !(vma->vm_flags & VM_NONLINEAR)) {
		if (!vma->vm_file ||
		    vma->vm_file->f_mapping != page->mapping)
			return -EFAULT;
	} else
		return -EFAULT;
	return vma_address(page, vma);
}