aboutsummaryrefslogtreecommitdiff
path: root/fs/fuse/file.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2010-05-25 15:06:06 +0200
committerMiklos Szeredi <mszeredi@suse.cz>2010-05-25 15:06:06 +0200
commit1bf94ca73ea524228b864275efa44373ebb939a0 (patch)
tree6ad0f17f4da1f1dd8a1aae2c77e5865fb5f42f33 /fs/fuse/file.c
parent4aa0edd294f69e3100973a0ecfa1e6b5ab42d83a (diff)
fuse: use get_user_pages_fast()
Replace uses of get_user_pages() with get_user_pages_fast(). It looks nicer and should be faster in most cases. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs/fuse/file.c')
-rw-r--r--fs/fuse/file.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 4172bfee0f1..29bda0564e6 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -994,10 +994,7 @@ static int fuse_get_user_pages(struct fuse_req *req, const char __user *buf,
nbytes = min_t(size_t, nbytes, FUSE_MAX_PAGES_PER_REQ << PAGE_SHIFT);
npages = (nbytes + offset + PAGE_SIZE - 1) >> PAGE_SHIFT;
npages = clamp(npages, 1, FUSE_MAX_PAGES_PER_REQ);
- down_read(&current->mm->mmap_sem);
- npages = get_user_pages(current, current->mm, user_addr, npages, !write,
- 0, req->pages, NULL);
- up_read(&current->mm->mmap_sem);
+ npages = get_user_pages_fast(user_addr, npages, !write, req->pages);
if (npages < 0)
return npages;