summaryrefslogtreecommitdiffstats
path: root/fs/orangefs/file.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-10-08 17:52:44 -0400
committerMike Marshall <hubcap@omnibond.com>2015-11-13 11:11:55 -0500
commit5f0e3c953fd962d82e1f38aeb24f7aec9bd1ba54 (patch)
treecffcbcf2f32abe4c5a6f041e096863ff20958397 /fs/orangefs/file.c
parent34204fde4c877cb33d8ec0df09f38333f570cc84 (diff)
downloadop-kernel-dev-5f0e3c953fd962d82e1f38aeb24f7aec9bd1ba54.zip
op-kernel-dev-5f0e3c953fd962d82e1f38aeb24f7aec9bd1ba54.tar.gz
orangefs: make postcopy_buffers() take iov_iter
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs/file.c')
-rw-r--r--fs/orangefs/file.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c
index 92a0974..c169bdd 100644
--- a/fs/orangefs/file.c
+++ b/fs/orangefs/file.c
@@ -72,23 +72,18 @@ static int precopy_buffers(struct pvfs2_bufmap *bufmap,
*/
static int postcopy_buffers(struct pvfs2_bufmap *bufmap,
int buffer_index,
- const struct iovec *vec,
- int nr_segs,
+ struct iov_iter *iter,
size_t total_size)
{
int ret = 0;
-
- struct iov_iter iter;
-
/*
* copy data to application/kernel by pushing it out to
* the iovec. NOTE; target buffers can be addresses or
* struct page pointers.
*/
if (total_size) {
- iov_iter_init(&iter, READ, vec, nr_segs, total_size);
ret = pvfs_bufmap_copy_to_iovec(bufmap,
- &iter,
+ iter,
buffer_index,
total_size);
if (ret < 0)
@@ -221,10 +216,11 @@ populate_shared_memory:
* postcopy_buffers only pertains to reads.
*/
if (type == PVFS_IO_READ) {
+ struct iov_iter iter;
+ iov_iter_init(&iter, READ, vec, nr_segs, new_op->downcall.resp.io.amt_complete);
ret = postcopy_buffers(bufmap,
buffer_index,
- vec,
- nr_segs,
+ &iter,
new_op->downcall.resp.io.amt_complete);
if (ret < 0) {
/*
OpenPOWER on IntegriCloud