mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Reviewed-by: Kirill A. Shutemov <[email protected]> Cc: Andres Lagar-Cavilla <[email protected]> Cc: Peter Feiner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
0fd71a56f4
commit
a7b780750e
7 changed files with 16 additions and 33 deletions
10
mm/util.c
10
mm/util.c
|
|
@ -240,14 +240,8 @@ int __weak get_user_pages_fast(unsigned long start,
|
|||
int nr_pages, int write, struct page **pages)
|
||||
{
|
||||
struct mm_struct *mm = current->mm;
|
||||
int ret;
|
||||
|
||||
down_read(&mm->mmap_sem);
|
||||
ret = get_user_pages(current, mm, start, nr_pages,
|
||||
write, 0, pages, NULL);
|
||||
up_read(&mm->mmap_sem);
|
||||
|
||||
return ret;
|
||||
return get_user_pages_unlocked(current, mm, start, nr_pages,
|
||||
write, 0, pages);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(get_user_pages_fast);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue