[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1238438693-29540-10-git-send-email-andy.grover@oracle.com>
Date: Mon, 30 Mar 2009 11:44:53 -0700
From: Andy Grover <andy.grover@...cle.com>
To: netdev@...r.kernel.org
Cc: rds-devel@....oracle.com
Subject: [PATCH 9/9] RDS: use get_user_pages_fast()
Use the new function that is simpler and faster.
Signed-off-by: Andy Grover <andy.grover@...cle.com>
---
net/rds/info.c | 5 +----
net/rds/rdma.c | 5 +----
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/net/rds/info.c b/net/rds/info.c
index 1d88553..62aeef3 100644
--- a/net/rds/info.c
+++ b/net/rds/info.c
@@ -188,10 +188,7 @@ int rds_info_getsockopt(struct socket *sock, int optname, char __user *optval,
ret = -ENOMEM;
goto out;
}
- down_read(¤t->mm->mmap_sem);
- ret = get_user_pages(current, current->mm, start, nr_pages, 1, 0,
- pages, NULL);
- up_read(¤t->mm->mmap_sem);
+ ret = get_user_pages_fast(start, nr_pages, 1, pages);
if (ret != nr_pages) {
if (ret > 0)
nr_pages = ret;
diff --git a/net/rds/rdma.c b/net/rds/rdma.c
index 584eac3..6ecea09 100644
--- a/net/rds/rdma.c
+++ b/net/rds/rdma.c
@@ -150,10 +150,7 @@ static int rds_pin_pages(unsigned long user_addr, unsigned int nr_pages,
{
int ret;
- down_read(¤t->mm->mmap_sem);
- ret = get_user_pages(current, current->mm, user_addr,
- nr_pages, write, 0, pages, NULL);
- up_read(¤t->mm->mmap_sem);
+ ret = get_user_pages_fast(user_addr, nr_pages, write, pages);
if (ret > 0 && (unsigned) ret < nr_pages) {
while (ret--)
--
1.5.6.3
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists