Commit 5f1a1369 authored by Jan Kara's avatar Jan Kara Committed by Greg Kroah-Hartman

sep: Convert sep_lock_user_pages() to get_user_pages_fast()

CC: Mark Allyn <mark.a.allyn@intel.com>
CC: Jayant Mangalampalli <jayant.mangalampalli@intel.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f4ee2ccb
...@@ -1263,13 +1263,8 @@ static int sep_lock_user_pages(struct sep_device *sep, ...@@ -1263,13 +1263,8 @@ static int sep_lock_user_pages(struct sep_device *sep,
} }
/* Convert the application virtual address into a set of physical */ /* Convert the application virtual address into a set of physical */
down_read(&current->mm->mmap_sem); result = get_user_pages_fast(app_virt_addr, num_pages,
result = get_user_pages(current, current->mm, app_virt_addr, ((in_out_flag == SEP_DRIVER_IN_FLAG) ? 0 : 1), page_array);
num_pages,
((in_out_flag == SEP_DRIVER_IN_FLAG) ? 0 : 1),
0, page_array, NULL);
up_read(&current->mm->mmap_sem);
/* Check the number of pages locked - if not all then exit with error */ /* Check the number of pages locked - if not all then exit with error */
if (result != num_pages) { if (result != num_pages) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment