summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-04-10 20:54:51 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2014-05-06 17:32:42 -0400
commite7c24607b5d68a4cdc56e09d70a3c8bae5f0519f (patch)
tree65b8b65636ba6d2470d3a004d027ff966811d270 /fs
parentf6c0a1920e0180175bd5e8e4aff8ea5556f1895d (diff)
downloadop-kernel-dev-e7c24607b5d68a4cdc56e09d70a3c8bae5f0519f.zip
op-kernel-dev-e7c24607b5d68a4cdc56e09d70a3c8bae5f0519f.tar.gz
kill iov_iter_copy_from_user()
all callers can use copy_page_from_iter() and it actually simplifies them. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/file.c3
-rw-r--r--fs/cifs/file.c7
2 files changed, 4 insertions, 6 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 88a6df4..ef9115e 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -737,13 +737,12 @@ static ssize_t ceph_sync_write(struct kiocb *iocb, const struct iovec *iov,
left = len;
for (n = 0; n < num_pages; n++) {
size_t plen = min_t(size_t, left, PAGE_SIZE);
- ret = iov_iter_copy_from_user(pages[n], &i, 0, plen);
+ ret = copy_page_from_iter(pages[n], 0, plen, &i);
if (ret != plen) {
ret = -EFAULT;
break;
}
left -= ret;
- iov_iter_advance(&i, ret);
}
if (ret < 0) {
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 5ed03e0..2900d15 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -2444,11 +2444,10 @@ cifs_iovec_write(struct file *file, const struct iovec *iov,
save_len = cur_len;
for (i = 0; i < nr_pages; i++) {
- bytes = min_t(const size_t, cur_len, PAGE_SIZE);
- copied = iov_iter_copy_from_user(wdata->pages[i], &it,
- 0, bytes);
+ bytes = min_t(size_t, cur_len, PAGE_SIZE);
+ copied = copy_page_from_iter(wdata->pages[i], 0, bytes,
+ &it);
cur_len -= copied;
- iov_iter_advance(&it, copied);
/*
* If we didn't copy as much as we expected, then that
* may mean we trod into an unmapped area. Stop copying
OpenPOWER on IntegriCloud