summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/lustre/llite/rw26.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-03-04 21:27:34 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2014-05-06 17:32:44 -0400
commitd8d3d94b80aa1a1c0ca75c58b8abdc7356f38418 (patch)
tree132f846b04371426b8795475597846aae75e7e07 /drivers/staging/lustre/lustre/llite/rw26.c
parentcb66a7a1f149ff705fa37cad6d1252b046e0ad4f (diff)
pass iov_iter to ->direct_IO()
unmodified, for now Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/staging/lustre/lustre/llite/rw26.c')
-rw-r--r--drivers/staging/lustre/lustre/llite/rw26.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/staging/lustre/lustre/llite/rw26.c b/drivers/staging/lustre/lustre/llite/rw26.c
index 7e3e0967993b..66e05c6f4d27 100644
--- a/drivers/staging/lustre/lustre/llite/rw26.c
+++ b/drivers/staging/lustre/lustre/llite/rw26.c
@@ -363,15 +363,14 @@ static ssize_t ll_direct_IO_26_seg(const struct lu_env *env, struct cl_io *io,
#define MAX_DIO_SIZE ((MAX_MALLOC / sizeof(struct brw_page) * PAGE_CACHE_SIZE) & \
~(DT_MAX_BRW_SIZE - 1))
static ssize_t ll_direct_IO_26(int rw, struct kiocb *iocb,
- const struct iovec *iov, loff_t file_offset,
- unsigned long nr_segs)
+ struct iov_iter *iter, loff_t file_offset)
{
struct lu_env *env;
struct cl_io *io;
struct file *file = iocb->ki_filp;
struct inode *inode = file->f_mapping->host;
struct ccc_object *obj = cl_inode2ccc(inode);
- long count = iov_length(iov, nr_segs);
+ long count = iov_length(iter->iov, iter->nr_segs);
long tot_bytes = 0, result = 0;
struct ll_inode_info *lli = ll_i2info(inode);
unsigned long seg = 0;
@@ -392,9 +391,9 @@ static ssize_t ll_direct_IO_26(int rw, struct kiocb *iocb,
MAX_DIO_SIZE >> PAGE_CACHE_SHIFT);
/* Check that all user buffers are aligned as well */
- for (seg = 0; seg < nr_segs; seg++) {
- if (((unsigned long)iov[seg].iov_base & ~CFS_PAGE_MASK) ||
- (iov[seg].iov_len & ~CFS_PAGE_MASK))
+ for (seg = 0; seg < iter->nr_segs; seg++) {
+ if (((unsigned long)iter->iov[seg].iov_base & ~CFS_PAGE_MASK) ||
+ (iter->iov[seg].iov_len & ~CFS_PAGE_MASK))
return -EINVAL;
}
@@ -411,9 +410,9 @@ static ssize_t ll_direct_IO_26(int rw, struct kiocb *iocb,
mutex_lock(&inode->i_mutex);
LASSERT(obj->cob_transient_pages == 0);
- for (seg = 0; seg < nr_segs; seg++) {
- long iov_left = iov[seg].iov_len;
- unsigned long user_addr = (unsigned long)iov[seg].iov_base;
+ for (seg = 0; seg < iter->nr_segs; seg++) {
+ long iov_left = iter->iov[seg].iov_len;
+ unsigned long user_addr = (unsigned long)iter->iov[seg].iov_base;
if (rw == READ) {
if (file_offset >= i_size_read(inode))