aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorAndrea Arcangeli <aarcange@redhat.com>2015-02-11 18:27:23 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-11 20:06:05 -0500
commita7b780750e1a1c7833812681e1f8fa30bbb06802 (patch)
treee13f7ac217df9904b5cbc1cb624c9f7c9e2130ac /arch/sparc
parent0fd71a56f41d4ffabeda1dae9ff5ed4f34d4e935 (diff)
mm: gup: use get_user_pages_unlocked within get_user_pages_fast
This allows the get_user_pages_fast slow path to release the mmap_sem before blocking. Signed-off-by: Andrea Arcangeli <aarcange@redhat.com> Reviewed-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Andres Lagar-Cavilla <andreslc@google.com> Cc: Peter Feiner <pfeiner@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/mm/gup.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/sparc/mm/gup.c b/arch/sparc/mm/gup.c
index ae6ce383d4df..2e5c4fc2daa9 100644
--- a/arch/sparc/mm/gup.c
+++ b/arch/sparc/mm/gup.c
@@ -249,10 +249,8 @@ slow:
249 start += nr << PAGE_SHIFT; 249 start += nr << PAGE_SHIFT;
250 pages += nr; 250 pages += nr;
251 251
252 down_read(&mm->mmap_sem); 252 ret = get_user_pages_unlocked(current, mm, start,
253 ret = get_user_pages(current, mm, start, 253 (end - start) >> PAGE_SHIFT, write, 0, pages);
254 (end - start) >> PAGE_SHIFT, write, 0, pages, NULL);
255 up_read(&mm->mmap_sem);
256 254
257 /* Have to be a bit careful with return values */ 255 /* Have to be a bit careful with return values */
258 if (nr > 0) { 256 if (nr > 0) {