diff options
author | Jan Kara <jack@suse.cz> | 2013-10-02 18:27:47 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-06 05:04:55 +0400 |
commit | 240ddd495a9e72073d11b1b7c2ec9ea14e7015cb (patch) | |
tree | 68f1fe2c753dcfca69748bd7226da531654034ac /drivers/misc/vmw_vmci/vmci_host.c | |
parent | af190494f9b2e1fb6e1c039e9626c3c334717da1 (diff) | |
download | linux-240ddd495a9e72073d11b1b7c2ec9ea14e7015cb.tar.xz |
vmw_vmci: Convert driver to use get_user_pages_fast()
Convert vmci_host_setup_notify() and qp_host_get_user_memory() to use
get_user_pages_fast() instead of get_user_pages(). Note that
qp_host_get_user_memory() was using mmap_sem for writing without an
apparent reason.
CC: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/vmw_vmci/vmci_host.c')
-rw-r--r-- | drivers/misc/vmw_vmci/vmci_host.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/misc/vmw_vmci/vmci_host.c b/drivers/misc/vmw_vmci/vmci_host.c index d4722b3dc8ec..1723a6e4f2e8 100644 --- a/drivers/misc/vmw_vmci/vmci_host.c +++ b/drivers/misc/vmw_vmci/vmci_host.c @@ -243,11 +243,7 @@ static int vmci_host_setup_notify(struct vmci_ctx *context, /* * Lock physical page backing a given user VA. */ - down_read(¤t->mm->mmap_sem); - retval = get_user_pages(current, current->mm, - PAGE_ALIGN(uva), - 1, 1, 0, &page, NULL); - up_read(¤t->mm->mmap_sem); + retval = get_user_pages_fast(PAGE_ALIGN(uva), 1, 1, &page); if (retval != 1) return VMCI_ERROR_GENERIC; |