struct address_space *mapping = inode->i_mapping;
static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma){	struct inode *inode = file->f_dentry->d_inode;	struct address_space *mapping = inode->i_mapping;	loff_t len, vma_len;	int ret;	if ((vma->vm_flags & (VM_MAYSHARE | VM_WRITE)) == VM_WRITE)		return -EINVAL;	if (vma->vm_pgoff & (HPAGE_SIZE / PAGE_SIZE - 1))		return -EINVAL;	if (vma->vm_start & ~HPAGE_MASK)		return -EINVAL;	if (vma->vm_end & ~HPAGE_MASK)		return -EINVAL;	if (vma->vm_end - vma->vm_start < HPAGE_SIZE)		return -EINVAL;	vma_len = (loff_t)(vma->vm_end - vma->vm_start);	down(&inode->i_sem);	file_accessed(file);	vma->vm_flags |= VM_HUGETLB | VM_RESERVED;	vma->vm_ops = &hugetlb_vm_ops;	ret = -ENOMEM;	len = vma_len + ((loff_t)vma->vm_pgoff << PAGE_SHIFT);	if (!(vma->vm_flags & VM_WRITE) && len > inode->i_size)		goto out;	ret = hugetlb_prefault(mapping, vma);	if (ret)		goto out;	if (inode->i_size < len)		inode->i_size = len;out:	up(&inode->i_sem);	return ret;}