@@ -337,10 +337,8 @@ static ssize_t nfs_direct_read_schedule_segment(struct nfs_pageio_descriptor *de
if (!pagevec)
break;
if (uio) {
- down_read(¤t->mm->mmap_sem);
- result = get_user_pages(current, current->mm, user_addr,
- npages, 1, 0, pagevec, NULL);
- up_read(¤t->mm->mmap_sem);
+ result = get_user_pages_fast(user_addr, npages, 1,
+ pagevec);
if (result < 0)
break;
} else {
@@ -658,10 +656,8 @@ static ssize_t nfs_direct_write_schedule_segment(struct nfs_pageio_descriptor *d
break;
if (uio) {
- down_read(¤t->mm->mmap_sem);
- result = get_user_pages(current, current->mm, user_addr,
- npages, 0, 0, pagevec, NULL);
- up_read(¤t->mm->mmap_sem);
+ result = get_user_pages_fast(user_addr, npages, 0,
+ pagevec);
if (result < 0)
break;
} else {
CC: Trond Myklebust <Trond.Myklebust@netapp.com> CC: linux-nfs@vger.kernel.org Signed-off-by: Jan Kara <jack@suse.cz> --- fs/nfs/direct.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)