From: Jan Kara Date: Wed, 2 Oct 2013 14:27:52 +0000 (+0200) Subject: sep: Convert sep_lock_user_pages() to get_user_pages_fast() X-Git-Tag: upstream/snapshot3+hdmi~4059^2~454 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5f1a1369e89e05baba1df72834c9b48cd1ce45e1;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git sep: Convert sep_lock_user_pages() to get_user_pages_fast() CC: Mark Allyn CC: Jayant Mangalampalli Signed-off-by: Jan Kara Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/sep/sep_main.c b/drivers/staging/sep/sep_main.c index 6a98a20..11f5b21 100644 --- a/drivers/staging/sep/sep_main.c +++ b/drivers/staging/sep/sep_main.c @@ -1263,13 +1263,8 @@ static int sep_lock_user_pages(struct sep_device *sep, } /* Convert the application virtual address into a set of physical */ - down_read(¤t->mm->mmap_sem); - result = get_user_pages(current, current->mm, app_virt_addr, - num_pages, - ((in_out_flag == SEP_DRIVER_IN_FLAG) ? 0 : 1), - 0, page_array, NULL); - - up_read(¤t->mm->mmap_sem); + result = get_user_pages_fast(app_virt_addr, num_pages, + ((in_out_flag == SEP_DRIVER_IN_FLAG) ? 0 : 1), page_array); /* Check the number of pages locked - if not all then exit with error */ if (result != num_pages) {