From: Jan Kara <jack@suse.com>
To: linux-mm@kvack.org
Cc: Jan Kara <jack@suse.cz>, Timur Tabi <timur@freescale.com>
Subject: [PATCH 4/7] fsl_hypervisor: Convert ioctl_memcpy() to use get_user_pages_fast()
Date: Tue, 6 Oct 2015 11:24:27 +0200 [thread overview]
Message-ID: <1444123470-4932-5-git-send-email-jack@suse.com> (raw)
In-Reply-To: <1444123470-4932-1-git-send-email-jack@suse.com>
From: Jan Kara <jack@suse.cz>
CC: Timur Tabi <timur@freescale.com>
Signed-off-by: Jan Kara <jack@suse.cz>
---
drivers/virt/fsl_hypervisor.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/virt/fsl_hypervisor.c b/drivers/virt/fsl_hypervisor.c
index 32c8fc5f7a5c..c65e5e60d7fd 100644
--- a/drivers/virt/fsl_hypervisor.c
+++ b/drivers/virt/fsl_hypervisor.c
@@ -243,13 +243,8 @@ static long ioctl_memcpy(struct fsl_hv_ioctl_memcpy __user *p)
sg_list = PTR_ALIGN(sg_list_unaligned, sizeof(struct fh_sg_list));
/* Get the physical addresses of the source buffer */
- down_read(¤t->mm->mmap_sem);
- num_pinned = get_user_pages(current, current->mm,
- param.local_vaddr - lb_offset, num_pages,
- (param.source == -1) ? READ : WRITE,
- 0, pages, NULL);
- up_read(¤t->mm->mmap_sem);
-
+ num_pinned = get_user_pages_fast(param.local_vaddr - lb_offset,
+ num_pages, (param.source == -1) ? READ : WRITE, pages);
if (num_pinned != num_pages) {
/* get_user_pages() failed */
pr_debug("fsl-hv: could not lock source buffer\n");
--
2.1.4
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-10-06 9:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-06 9:24 [PATCH 0/7] get_user_pages() cleanup Jan Kara
2015-10-06 9:24 ` [PATCH 1/7] cris: Convert cryptocop to use get_user_pages_fast() Jan Kara
2015-10-06 9:53 ` Mikael Starvik
2015-10-09 14:41 ` Jesper Nilsson
2015-10-06 9:24 ` [PATCH 2/7] ia64: Use get_user_pages_fast() in err_inject.c Jan Kara
2015-10-06 9:24 ` [PATCH 3/7] drm: Convert via driver to use get_user_pages_fast() Jan Kara
2015-10-06 9:24 ` Jan Kara [this message]
2015-10-06 9:24 ` [PATCH 5/7] IB/mthca: Convert mthca_map_user_db() " Jan Kara
2015-10-06 9:24 ` [PATCH 6/7] drm/i915: Convert to use get_user_page_unlocked() Jan Kara
2015-10-06 9:24 ` [PATCH 7/7] [media] ivtv: Convert to get_user_pages_unlocked() Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1444123470-4932-5-git-send-email-jack@suse.com \
--to=jack@suse.com \
--cc=jack@suse.cz \
--cc=linux-mm@kvack.org \
--cc=timur@freescale.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).