diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-10-09 00:54:31 +0300 |
---|---|---|
committer | Mike Marshall <hubcap@omnibond.com> | 2015-11-13 19:18:50 +0300 |
commit | a5c126a52269ce304b6da95e980e595668bf467d (patch) | |
tree | da493a0a58abc4ae5c775a70517f026b5e237ba1 /fs/orangefs/file.c | |
parent | 5f0e3c953fd962d82e1f38aeb24f7aec9bd1ba54 (diff) | |
download | linux-a5c126a52269ce304b6da95e980e595668bf467d.tar.xz |
orangefs: make precopy_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.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index c169bdda66a3..bd8e6f866047 100644 --- a/fs/orangefs/file.c +++ b/fs/orangefs/file.c @@ -31,13 +31,10 @@ do { \ */ static int precopy_buffers(struct pvfs2_bufmap *bufmap, int buffer_index, - const struct iovec *vec, - unsigned long nr_segs, + struct iov_iter *iter, size_t total_size) { int ret = 0; - struct iov_iter iter; - /* * copy data from application/kernel by pulling it out * of the iovec. @@ -45,9 +42,8 @@ static int precopy_buffers(struct pvfs2_bufmap *bufmap, if (total_size) { - iov_iter_init(&iter, WRITE, vec, nr_segs, total_size); ret = pvfs_bufmap_copy_from_iovec(bufmap, - &iter, + iter, buffer_index, total_size); if (ret < 0) @@ -152,10 +148,11 @@ populate_shared_memory: * precopy_buffers only pertains to writes. */ if (type == PVFS_IO_WRITE) { + struct iov_iter iter; + iov_iter_init(&iter, WRITE, vec, nr_segs, total_size); ret = precopy_buffers(bufmap, buffer_index, - vec, - nr_segs, + &iter, total_size); if (ret < 0) goto out; |