summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-03-05 19:28:09 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2014-05-06 17:32:49 -0400
commit71d8e532b1549a478e6a6a8a44f309d050294d00 (patch)
tree58b40c17cbb806c94aa07121a8b010d16f825d27 /fs
parented978a811ec528dbe40243605c3afab55892f722 (diff)
downloadop-kernel-dev-71d8e532b1549a478e6a6a8a44f309d050294d00.zip
op-kernel-dev-71d8e532b1549a478e6a6a8a44f309d050294d00.tar.gz
start adding the tag to iov_iter
For now, just use the same thing we pass to ->direct_IO() - it's all iovec-based at the moment. Pass it explicitly to iov_iter_init() and account for kvec vs. iovec in there, by the same kludge NFS ->direct_IO() uses. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/file.c2
-rw-r--r--fs/ceph/file.c8
-rw-r--r--fs/cifs/file.c4
-rw-r--r--fs/fuse/file.c6
-rw-r--r--fs/nfs/file.c4
-rw-r--r--fs/ocfs2/file.c2
-rw-r--r--fs/pipe.c2
-rw-r--r--fs/splice.c2
-rw-r--r--fs/xfs/xfs_file.c4
9 files changed, 17 insertions, 17 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index a0a94a3..f8cee20 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -1740,7 +1740,7 @@ static ssize_t btrfs_file_aio_write(struct kiocb *iocb,
goto out;
}
- iov_iter_init(&i, iov, nr_segs, count, 0);
+ iov_iter_init(&i, WRITE, iov, nr_segs, count);
err = file_remove_suid(file);
if (err) {
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 910a302..5b93cad 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -582,7 +582,7 @@ ceph_sync_direct_write(struct kiocb *iocb, const struct iovec *iov,
CEPH_OSD_FLAG_ONDISK |
CEPH_OSD_FLAG_WRITE;
- iov_iter_init(&i, iov, nr_segs, count, 0);
+ iov_iter_init(&i, WRITE, iov, nr_segs, count);
while (iov_iter_count(&i) > 0) {
void __user *data = i.iov->iov_base + i.iov_offset;
@@ -703,7 +703,7 @@ static ssize_t ceph_sync_write(struct kiocb *iocb, const struct iovec *iov,
CEPH_OSD_FLAG_WRITE |
CEPH_OSD_FLAG_ACK;
- iov_iter_init(&i, iov, nr_segs, count, 0);
+ iov_iter_init(&i, WRITE, iov, nr_segs, count);
while ((len = iov_iter_count(&i)) > 0) {
size_t left;
@@ -808,7 +808,7 @@ static ssize_t ceph_aio_read(struct kiocb *iocb, const struct iovec *iov,
int checkeof = 0, read = 0;
struct iov_iter i;
- iov_iter_init(&i, iov, nr_segs, len, 0);
+ iov_iter_init(&i, READ, iov, nr_segs, len);
again:
dout("aio_read %p %llx.%llx %llu~%u trying to get caps on %p\n",
@@ -961,7 +961,7 @@ retry_snap:
* are pending vmtruncate. So write and vmtruncate
* can not run at the same time
*/
- iov_iter_init(&from, iov, nr_segs, count, 0);
+ iov_iter_init(&from, WRITE, iov, nr_segs, count);
written = generic_perform_write(file, &from, pos);
if (likely(written >= 0))
iocb->ki_pos = pos + written;
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index a4ccc39..15201c2 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -2424,7 +2424,7 @@ cifs_iovec_write(struct file *file, const struct iovec *iov,
else
pid = current->tgid;
- iov_iter_init(&it, iov, nr_segs, len, 0);
+ iov_iter_init(&it, WRITE, iov, nr_segs, len);
do {
size_t save_len;
@@ -2854,7 +2854,7 @@ ssize_t cifs_user_readv(struct kiocb *iocb, const struct iovec *iov,
if (!len)
return 0;
- iov_iter_init(&to, iov, nr_segs, len, 0);
+ iov_iter_init(&to, READ, iov, nr_segs, len);
INIT_LIST_HEAD(&rdata_list);
cifs_sb = CIFS_SB(file->f_path.dentry->d_sb);
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index fc54d04..4a5519c 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1217,7 +1217,7 @@ static ssize_t fuse_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
err = generic_write_checks(file, &pos, &count, S_ISBLK(inode->i_mode));
if (err)
goto out;
- iov_iter_init(&i, iov, nr_segs, count, 0);
+ iov_iter_init(&i, WRITE, iov, nr_segs, count);
if (count == 0)
goto out;
@@ -1386,7 +1386,7 @@ ssize_t fuse_direct_io(struct fuse_io_priv *io, const struct iovec *iov,
struct fuse_req *req;
struct iov_iter ii;
- iov_iter_init(&ii, iov, nr_segs, count, 0);
+ iov_iter_init(&ii, write ? WRITE : READ, iov, nr_segs, count);
if (io->async)
req = fuse_get_req_for_background(fc, fuse_iter_npages(&ii));
@@ -2367,7 +2367,7 @@ static int fuse_ioctl_copy_user(struct page **pages, struct iovec *iov,
if (!bytes)
return 0;
- iov_iter_init(&ii, iov, nr_segs, bytes, 0);
+ iov_iter_init(&ii, to_user ? READ : WRITE, iov, nr_segs, bytes);
while (iov_iter_count(&ii)) {
struct page *page = pages[page_idx++];
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index a352bc6..ead8f44 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -173,7 +173,7 @@ nfs_file_read(struct kiocb *iocb, const struct iovec *iov,
ssize_t result;
struct iov_iter to;
- iov_iter_init(&to, iov, nr_segs, count, 0);
+ iov_iter_init(&to, READ, iov, nr_segs, count);
if (iocb->ki_filp->f_flags & O_DIRECT)
return nfs_file_direct_read(iocb, &to, pos, true);
@@ -648,7 +648,7 @@ ssize_t nfs_file_write(struct kiocb *iocb, const struct iovec *iov,
ssize_t result;
size_t count = iov_length(iov, nr_segs);
struct iov_iter from;
- iov_iter_init(&from, iov, nr_segs, count, 0);
+ iov_iter_init(&from, WRITE, iov, nr_segs, count);
result = nfs_key_timeout_notify(file, inode);
if (result)
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index d33c4ce..9ce9ed7 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -2361,7 +2361,7 @@ relock:
if (ret)
goto out_dio;
- iov_iter_init(&from, iov, nr_segs, count, 0);
+ iov_iter_init(&from, WRITE, iov, nr_segs, count);
if (direct_io) {
written = generic_file_direct_write(iocb, &from, *ppos,
count, ocount);
diff --git a/fs/pipe.c b/fs/pipe.c
index 034bffa..cd4ccf0 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -287,7 +287,7 @@ pipe_read(struct kiocb *iocb, const struct iovec *_iov,
if (unlikely(total_len == 0))
return 0;
- iov_iter_init(&iter, iov, nr_segs, total_len, 0);
+ iov_iter_init(&iter, READ, iov, nr_segs, total_len);
do_wakeup = 0;
ret = 0;
diff --git a/fs/splice.c b/fs/splice.c
index 9bc07d2..f99e420 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1548,7 +1548,7 @@ static long vmsplice_to_user(struct file *file, const struct iovec __user *uiov,
if (ret <= 0)
return ret;
- iov_iter_init(&iter, iov, nr_segs, count, 0);
+ iov_iter_init(&iter, READ, iov, nr_segs, count);
sd.len = 0;
sd.total_len = count;
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index f0f8084..762bb3e 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -697,7 +697,7 @@ xfs_file_dio_aio_write(
}
trace_xfs_file_direct_write(ip, count, iocb->ki_pos, 0);
- iov_iter_init(&from, iovp, nr_segs, count, 0);
+ iov_iter_init(&from, WRITE, iovp, nr_segs, count);
ret = generic_file_direct_write(iocb, &from, pos, count, ocount);
out:
@@ -731,7 +731,7 @@ xfs_file_buffered_aio_write(
if (ret)
goto out;
- iov_iter_init(&from, iovp, nr_segs, count, 0);
+ iov_iter_init(&from, WRITE, iovp, nr_segs, count);
/* We can write back this queue in page reclaim */
current->backing_dev_info = mapping->backing_dev_info;
OpenPOWER on IntegriCloud