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/s390 | |
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/s390')
-rw-r--r-- | arch/s390/mm/gup.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/s390/mm/gup.c b/arch/s390/mm/gup.c index 639fce464008..5c586c78ca8d 100644 --- a/arch/s390/mm/gup.c +++ b/arch/s390/mm/gup.c | |||
@@ -235,10 +235,8 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write, | |||
235 | /* Try to get the remaining pages with get_user_pages */ | 235 | /* Try to get the remaining pages with get_user_pages */ |
236 | start += nr << PAGE_SHIFT; | 236 | start += nr << PAGE_SHIFT; |
237 | pages += nr; | 237 | pages += nr; |
238 | down_read(&mm->mmap_sem); | 238 | ret = get_user_pages_unlocked(current, mm, start, |
239 | ret = get_user_pages(current, mm, start, | 239 | nr_pages - nr, write, 0, pages); |
240 | nr_pages - nr, write, 0, pages, NULL); | ||
241 | up_read(&mm->mmap_sem); | ||
242 | /* Have to be a bit careful with return values */ | 240 | /* Have to be a bit careful with return values */ |
243 | if (nr > 0) | 241 | if (nr > 0) |
244 | ret = (ret < 0) ? nr : ret + nr; | 242 | ret = (ret < 0) ? nr : ret + nr; |