|
@@ -2882,7 +2882,8 @@ static int do_read_fault(struct mm_struct *mm, struct vm_area_struct *vma,
|
|
* if page by the offset is not ready to be mapped (cold cache or
|
|
* if page by the offset is not ready to be mapped (cold cache or
|
|
* something).
|
|
* something).
|
|
*/
|
|
*/
|
|
- if (vma->vm_ops->map_pages && fault_around_pages() > 1) {
|
|
|
|
|
|
+ if (vma->vm_ops->map_pages && !(flags & FAULT_FLAG_NONLINEAR) &&
|
|
|
|
+ fault_around_pages() > 1) {
|
|
pte = pte_offset_map_lock(mm, pmd, address, &ptl);
|
|
pte = pte_offset_map_lock(mm, pmd, address, &ptl);
|
|
do_fault_around(vma, address, pte, pgoff, flags);
|
|
do_fault_around(vma, address, pte, pgoff, flags);
|
|
if (!pte_same(*pte, orig_pte))
|
|
if (!pte_same(*pte, orig_pte))
|