mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
mm: gup: use get_user_pages_unlocked
This allows those get_user_pages calls to pass FAULT_FLAG_ALLOW_RETRY to the page fault in order to release the mmap_sem during the I/O. 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
a7b780750e
commit
7e33912849
5 changed files with 10 additions and 22 deletions
|
|
@ -124,10 +124,8 @@ int ivtv_udma_setup(struct ivtv *itv, unsigned long ivtv_dest_addr,
|
|||
}
|
||||
|
||||
/* Get user pages for DMA Xfer */
|
||||
down_read(¤t->mm->mmap_sem);
|
||||
err = get_user_pages(current, current->mm,
|
||||
user_dma.uaddr, user_dma.page_count, 0, 1, dma->map, NULL);
|
||||
up_read(¤t->mm->mmap_sem);
|
||||
err = get_user_pages_unlocked(current, current->mm,
|
||||
user_dma.uaddr, user_dma.page_count, 0, 1, dma->map);
|
||||
|
||||
if (user_dma.page_count != err) {
|
||||
IVTV_DEBUG_WARN("failed to map user pages, returned %d instead of %d\n",
|
||||
|
|
|
|||
Loading…
Reference in a new issue