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 /mm/util.c | |
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 'mm/util.c')
-rw-r--r-- | mm/util.c | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -240,14 +240,8 @@ int __weak get_user_pages_fast(unsigned long start, | |||
240 | int nr_pages, int write, struct page **pages) | 240 | int nr_pages, int write, struct page **pages) |
241 | { | 241 | { |
242 | struct mm_struct *mm = current->mm; | 242 | struct mm_struct *mm = current->mm; |
243 | int ret; | 243 | return get_user_pages_unlocked(current, mm, start, nr_pages, |
244 | 244 | write, 0, pages); | |
245 | down_read(&mm->mmap_sem); | ||
246 | ret = get_user_pages(current, mm, start, nr_pages, | ||
247 | write, 0, pages, NULL); | ||
248 | up_read(&mm->mmap_sem); | ||
249 | |||
250 | return ret; | ||
251 | } | 245 | } |
252 | EXPORT_SYMBOL_GPL(get_user_pages_fast); | 246 | EXPORT_SYMBOL_GPL(get_user_pages_fast); |
253 | 247 | ||