summaryrefslogtreecommitdiffstats
path: root/fs/fuse
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/fuse
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/fuse')
-rw-r--r--fs/fuse/file.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 96d513e01a5d..126deb5d0a9c 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1235,15 +1235,13 @@ static ssize_t fuse_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
goto out;
if (file->f_flags & O_DIRECT) {
- written = generic_file_direct_write(iocb, iov, &nr_segs, pos,
- count, ocount);
+ iov_iter_init(&i, iov, nr_segs, count, 0);
+ written = generic_file_direct_write(iocb, &i, pos, count, ocount);
if (written < 0 || written == count)
goto out;
pos += written;
- count -= written;
- iov_iter_init(&i, iov, nr_segs, count, written);
written_buffered = fuse_perform_write(file, mapping, &i, pos);
if (written_buffered < 0) {
err = written_buffered;