aboutsummaryrefslogtreecommitdiffstats
path: root/mm/gup.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/gup.c')
-rw-r--r--mm/gup.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mm/gup.c b/mm/gup.c
index 1b46e6e74881..6afae32571ca 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -516,7 +516,7 @@ static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma,
516 } 516 }
517 517
518 if (ret & VM_FAULT_RETRY) { 518 if (ret & VM_FAULT_RETRY) {
519 if (nonblocking) 519 if (nonblocking && !(fault_flags & FAULT_FLAG_RETRY_NOWAIT))
520 *nonblocking = 0; 520 *nonblocking = 0;
521 return -EBUSY; 521 return -EBUSY;
522 } 522 }
@@ -890,7 +890,10 @@ static __always_inline long __get_user_pages_locked(struct task_struct *tsk,
890 break; 890 break;
891 } 891 }
892 if (*locked) { 892 if (*locked) {
893 /* VM_FAULT_RETRY didn't trigger */ 893 /*
894 * VM_FAULT_RETRY didn't trigger or it was a
895 * FOLL_NOWAIT.
896 */
894 if (!pages_done) 897 if (!pages_done)
895 pages_done = ret; 898 pages_done = ret;
896 break; 899 break;