|
@@ -2466,6 +2466,13 @@ static inline vm_fault_t vmf_insert_pfn(struct vm_area_struct *vma,
|
|
return VM_FAULT_NOPAGE;
|
|
return VM_FAULT_NOPAGE;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static inline vm_fault_t vmf_error(int err)
|
|
|
|
+{
|
|
|
|
+ if (err == -ENOMEM)
|
|
|
|
+ return VM_FAULT_OOM;
|
|
|
|
+ return VM_FAULT_SIGBUS;
|
|
|
|
+}
|
|
|
|
+
|
|
struct page *follow_page_mask(struct vm_area_struct *vma,
|
|
struct page *follow_page_mask(struct vm_area_struct *vma,
|
|
unsigned long address, unsigned int foll_flags,
|
|
unsigned long address, unsigned int foll_flags,
|
|
unsigned int *page_mask);
|
|
unsigned int *page_mask);
|