diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/hugetlbfs/inode.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index aeabf80f81a5..1576bbecd084 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c | |||
@@ -103,9 +103,9 @@ static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma) | |||
103 | ret = -ENOMEM; | 103 | ret = -ENOMEM; |
104 | len = vma_len + ((loff_t)vma->vm_pgoff << PAGE_SHIFT); | 104 | len = vma_len + ((loff_t)vma->vm_pgoff << PAGE_SHIFT); |
105 | 105 | ||
106 | if (vma->vm_flags & VM_MAYSHARE && | 106 | if (hugetlb_reserve_pages(inode, |
107 | hugetlb_reserve_pages(inode, vma->vm_pgoff >> (HPAGE_SHIFT-PAGE_SHIFT), | 107 | vma->vm_pgoff >> (HPAGE_SHIFT-PAGE_SHIFT), |
108 | len >> HPAGE_SHIFT)) | 108 | len >> HPAGE_SHIFT, vma)) |
109 | goto out; | 109 | goto out; |
110 | 110 | ||
111 | ret = 0; | 111 | ret = 0; |
@@ -942,7 +942,7 @@ struct file *hugetlb_file_setup(const char *name, size_t size) | |||
942 | goto out_dentry; | 942 | goto out_dentry; |
943 | 943 | ||
944 | error = -ENOMEM; | 944 | error = -ENOMEM; |
945 | if (hugetlb_reserve_pages(inode, 0, size >> HPAGE_SHIFT)) | 945 | if (hugetlb_reserve_pages(inode, 0, size >> HPAGE_SHIFT, NULL)) |
946 | goto out_inode; | 946 | goto out_inode; |
947 | 947 | ||
948 | d_instantiate(dentry, inode); | 948 | d_instantiate(dentry, inode); |