[PATCH] hugetlb: demand fault handler
[deliverable/linux.git] / fs / hugetlbfs / inode.c
index 8f94feb24c0a4621f85ad7d4d0f5469025be7615..2627efe767cf485257f381530ab8234cfb7a218d 100644 (file)
@@ -48,7 +48,6 @@ int sysctl_hugetlb_shm_group;
 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;
 
@@ -79,10 +78,8 @@ static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma)
        if (!(vma->vm_flags & VM_WRITE) && len > inode->i_size)
                goto out;
 
-       ret = hugetlb_prefault(mapping, vma);
-       if (ret)
-               goto out;
-
+       ret = 0;
+       hugetlb_prefault_arch_hook(vma->vm_mm);
        if (inode->i_size < len)
                inode->i_size = len;
 out:
This page took 0.03973 seconds and 5 git commands to generate.