summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mm/gup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/gup.c b/mm/gup.c
index a21230569520..afce0bc47e70 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -1329,7 +1329,6 @@ retry:
if (fatal_signal_pending(current))
break;
- *locked = 1;
ret = down_read_killable(&mm->mmap_sem);
if (ret) {
BUG_ON(ret > 0);
@@ -1338,6 +1337,7 @@ retry:
break;
}
+ *locked = 1;
ret = __get_user_pages(tsk, mm, start, 1, flags | FOLL_TRIED,
pages, NULL, locked);
if (!*locked) {