summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-03-04 04:03:20 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2014-05-06 23:32:42 +0200
commitf8579f8673b7ecdb7a81d5d5bb1d981093d9aa94 (patch)
treed4287d0dffbf3758e709238302fb8865cdd66651 /fs/ocfs2
parentkill iov_iter_copy_from_user() (diff)
downloadlinux-f8579f8673b7ecdb7a81d5d5bb1d981093d9aa94.tar.xz
linux-f8579f8673b7ecdb7a81d5d5bb1d981093d9aa94.zip
generic_file_direct_write(): switch to iov_iter
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 8970dcf74de5..d6d78c2aa96e 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -2251,6 +2251,7 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
int full_coherency = !(osb->s_mount_opt &
OCFS2_MOUNT_COHERENCY_BUFFERED);
int unaligned_dio = 0;
+ struct iov_iter from;
trace_ocfs2_file_aio_write(inode, file, file->f_path.dentry,
(unsigned long long)OCFS2_I(inode)->ip_blkno,
@@ -2365,16 +2366,15 @@ relock:
if (ret)
goto out_dio;
+ iov_iter_init(&from, iov, nr_segs, count, 0);
if (direct_io) {
- written = generic_file_direct_write(iocb, iov, &nr_segs, *ppos,
+ written = generic_file_direct_write(iocb, &from, *ppos,
count, ocount);
if (written < 0) {
ret = written;
goto out_dio;
}
} else {
- struct iov_iter from;
- iov_iter_init(&from, iov, nr_segs, count, 0);
current->backing_dev_info = file->f_mapping->backing_dev_info;
written = generic_perform_write(file, &from, *ppos);
if (likely(written >= 0))