aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/memory.c')
-rw-r--r--mm/memory.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/memory.c b/mm/memory.c
index e48945ab362b..615be5127ce1 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1569,6 +1569,8 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
1569 fault_flags |= FAULT_FLAG_WRITE; 1569 fault_flags |= FAULT_FLAG_WRITE;
1570 if (nonblocking) 1570 if (nonblocking)
1571 fault_flags |= FAULT_FLAG_ALLOW_RETRY; 1571 fault_flags |= FAULT_FLAG_ALLOW_RETRY;
1572 if (foll_flags & FOLL_NOWAIT)
1573 fault_flags |= (FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_RETRY_NOWAIT);
1572 1574
1573 ret = handle_mm_fault(mm, vma, start, 1575 ret = handle_mm_fault(mm, vma, start,
1574 fault_flags); 1576 fault_flags);
@@ -1595,7 +1597,8 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
1595 tsk->min_flt++; 1597 tsk->min_flt++;
1596 1598
1597 if (ret & VM_FAULT_RETRY) { 1599 if (ret & VM_FAULT_RETRY) {
1598 *nonblocking = 0; 1600 if (nonblocking)
1601 *nonblocking = 0;
1599 return i; 1602 return i;
1600 } 1603 }
1601 1604