aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
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
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')
-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,
363#define MAX_DIO_SIZE ((MAX_MALLOC / sizeof(struct brw_page) * PAGE_CACHE_SIZE) & \ 363#define MAX_DIO_SIZE ((MAX_MALLOC / sizeof(struct brw_page) * PAGE_CACHE_SIZE) & \
364 ~(DT_MAX_BRW_SIZE - 1)) 364 ~(DT_MAX_BRW_SIZE - 1))
365static ssize_t ll_direct_IO_26(int rw, struct kiocb *iocb, 365static ssize_t ll_direct_IO_26(int rw, struct kiocb *iocb,
366 const struct iovec *iov, loff_t file_offset, 366 struct iov_iter *iter, loff_t file_offset)
367 unsigned long nr_segs)
368{ 367{
369 struct lu_env *env; 368 struct lu_env *env;
370 struct cl_io *io; 369 struct cl_io *io;
371 struct file *file = iocb->ki_filp; 370 struct file *file = iocb->ki_filp;
372 struct inode *inode = file->f_mapping->host; 371 struct inode *inode = file->f_mapping->host;
373 struct ccc_object *obj = cl_inode2ccc(inode); 372 struct ccc_object *obj = cl_inode2ccc(inode);
374 long count = iov_length(iov, nr_segs); 373 long count = iov_length(iter->iov, iter->nr_segs);
375 long tot_bytes = 0, result = 0; 374 long tot_bytes = 0, result = 0;
376 struct ll_inode_info *lli = ll_i2info(inode); 375 struct ll_inode_info *lli = ll_i2info(inode);
377 unsigned long seg = 0; 376 unsigned long seg = 0;
@@ -392,9 +391,9 @@ static ssize_t ll_direct_IO_26(int rw, struct kiocb *iocb,
392 MAX_DIO_SIZE >> PAGE_CACHE_SHIFT); 391 MAX_DIO_SIZE >> PAGE_CACHE_SHIFT);
393 392
394 /* Check that all user buffers are aligned as well */ 393 /* Check that all user buffers are aligned as well */
395 for (seg = 0; seg < nr_segs; seg++) { 394 for (seg = 0; seg < iter->nr_segs; seg++) {
396 if (((unsigned long)iov[seg].iov_base & ~CFS_PAGE_MASK) || 395 if (((unsigned long)iter->iov[seg].iov_base & ~CFS_PAGE_MASK) ||
397 (iov[seg].iov_len & ~CFS_PAGE_MASK)) 396 (iter->iov[seg].iov_len & ~CFS_PAGE_MASK))
398 return -EINVAL; 397 return -EINVAL;
399 } 398 }
400 399
@@ -411,9 +410,9 @@ static ssize_t ll_direct_IO_26(int rw, struct kiocb *iocb,
411 mutex_lock(&inode->i_mutex); 410 mutex_lock(&inode->i_mutex);
412 411
413 LASSERT(obj->cob_transient_pages == 0); 412 LASSERT(obj->cob_transient_pages == 0);
414 for (seg = 0; seg < nr_segs; seg++) { 413 for (seg = 0; seg < iter->nr_segs; seg++) {
415 long iov_left = iov[seg].iov_len; 414 long iov_left = iter->iov[seg].iov_len;
416 unsigned long user_addr = (unsigned long)iov[seg].iov_base; 415 unsigned long user_addr = (unsigned long)iter->iov[seg].iov_base;
417 416
418 if (rw == READ) { 417 if (rw == READ) {
419 if (file_offset >= i_size_read(inode)) 418 if (file_offset >= i_size_read(inode))