diff options
author | Andrea Arcangeli <aarcange@redhat.com> | 2015-02-11 18:27:23 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-11 20:06:05 -0500 |
commit | a7b780750e1a1c7833812681e1f8fa30bbb06802 (patch) | |
tree | e13f7ac217df9904b5cbc1cb624c9f7c9e2130ac /arch/x86/mm | |
parent | 0fd71a56f41d4ffabeda1dae9ff5ed4f34d4e935 (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/x86/mm')
-rw-r--r-- | arch/x86/mm/gup.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/x86/mm/gup.c b/arch/x86/mm/gup.c index 224b14235e96..89df70e0caa6 100644 --- a/arch/x86/mm/gup.c +++ b/arch/x86/mm/gup.c | |||
@@ -388,10 +388,9 @@ slow_irqon: | |||
388 | start += nr << PAGE_SHIFT; | 388 | start += nr << PAGE_SHIFT; |
389 | pages += nr; | 389 | pages += nr; |
390 | 390 | ||
391 | down_read(&mm->mmap_sem); | 391 | ret = get_user_pages_unlocked(current, mm, start, |
392 | ret = get_user_pages(current, mm, start, | 392 | (end - start) >> PAGE_SHIFT, |
393 | (end - start) >> PAGE_SHIFT, write, 0, pages, NULL); | 393 | write, 0, pages); |
394 | up_read(&mm->mmap_sem); | ||
395 | 394 | ||
396 | /* Have to be a bit careful with return values */ | 395 | /* Have to be a bit careful with return values */ |
397 | if (nr > 0) { | 396 | if (nr > 0) { |