Commit 0691df16 authored by Anton Blanchard's avatar Anton Blanchard

Merge bk://ppc.bkbits.net/for-linus-ppc64

into samba.org:/scratch/anton/linux-2.5_ppc64
parents c256f371 6e4755ed
...@@ -507,14 +507,21 @@ int hugetlb_prefault(struct address_space *mapping, struct vm_area_struct *vma) ...@@ -507,14 +507,21 @@ int hugetlb_prefault(struct address_space *mapping, struct vm_area_struct *vma)
+ (vma->vm_pgoff >> (HPAGE_SHIFT - PAGE_SHIFT)); + (vma->vm_pgoff >> (HPAGE_SHIFT - PAGE_SHIFT));
page = find_get_page(mapping, idx); page = find_get_page(mapping, idx);
if (!page) { if (!page) {
/* charge the fs quota first */
if (hugetlb_get_quota(mapping)) {
ret = -ENOMEM;
goto out;
}
page = alloc_hugetlb_page(); page = alloc_hugetlb_page();
if (!page) { if (!page) {
hugetlb_put_quota(mapping);
ret = -ENOMEM; ret = -ENOMEM;
goto out; goto out;
} }
ret = add_to_page_cache(page, mapping, idx, GFP_ATOMIC); ret = add_to_page_cache(page, mapping, idx, GFP_ATOMIC);
unlock_page(page); unlock_page(page);
if (ret) { if (ret) {
hugetlb_put_quota(mapping);
free_huge_page(page); free_huge_page(page);
goto out; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment