CC: Dan Williams <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
---
 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(&current->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(&current->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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to