summaryrefslogtreecommitdiff
path: root/fs/fuse
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-03-06 07:52:34 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2014-05-07 01:32:48 +0400
commit23faa7b8db9be0be4f158cfc558460bb95d9b245 (patch)
tree0677bd31dd8b65482bf042717f7ba61bb73b51b9 /fs/fuse
parent05bb2e0bc77cb005248be318d2b0ba369b8bbab3 (diff)
downloadlinux-23faa7b8db9be0be4f158cfc558460bb95d9b245.tar.xz
fuse_file_aio_write(): merge initializations of iov_iter
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/fuse')
-rw-r--r--fs/fuse/file.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 36f15f9c1de2..fc54d04a41e2 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1217,6 +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);
if (count == 0)
goto out;
@@ -1230,7 +1231,6 @@ static ssize_t fuse_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
goto out;
if (file->f_flags & O_DIRECT) {
- 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;
@@ -1256,7 +1256,6 @@ static ssize_t fuse_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
written += written_buffered;
iocb->ki_pos = pos + written_buffered;
} else {
- iov_iter_init(&i, iov, nr_segs, count, 0);
written = fuse_perform_write(file, mapping, &i, pos);
if (written >= 0)
iocb->ki_pos = pos + written;