CC: Dan Williams <dan.j.williams@xxxxxxxxx> Signed-off-by: Jan Kara <jack@xxxxxxx> --- drivers/dma/iovlock.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/dma/iovlock.c b/drivers/dma/iovlock.c index bb48a57c2fc1..8b16332da8a9 100644 --- a/drivers/dma/iovlock.c +++ b/drivers/dma/iovlock.c @@ -95,17 +95,10 @@ struct dma_pinned_list *dma_pin_iovec_pages(struct iovec *iov, size_t len) pages += page_list->nr_pages; /* pin pages down */ - down_read(¤t->mm->mmap_sem); - ret = get_user_pages( - current, - current->mm, - (unsigned long) iov[i].iov_base, - page_list->nr_pages, - 1, /* write */ - 0, /* force */ - page_list->pages, - NULL); - up_read(¤t->mm->mmap_sem); + ret = get_user_pages_fast((unsigned long) iov[i].iov_base, + page_list->nr_pages, + 1, /* write */ + page_list->pages); if (ret != page_list->nr_pages) goto unpin; -- 1.8.1.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>