|
@@ -1033,10 +1033,10 @@ static struct page *alloc_huge_page(struct vm_area_struct *vma,
|
|
|
*/
|
|
|
chg = vma_needs_reservation(h, vma, addr);
|
|
|
if (chg < 0)
|
|
|
- return ERR_PTR(chg);
|
|
|
+ return ERR_PTR(-VM_FAULT_OOM);
|
|
|
if (chg)
|
|
|
if (hugetlb_get_quota(inode->i_mapping, chg))
|
|
|
- return ERR_PTR(-ENOSPC);
|
|
|
+ return ERR_PTR(-VM_FAULT_SIGBUS);
|
|
|
|
|
|
spin_lock(&hugetlb_lock);
|
|
|
page = dequeue_huge_page_vma(h, vma, addr, avoid_reserve);
|