aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-04-02 14:47:09 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2014-05-06 17:37:57 -0400
commit37c20f16e7a73e5fe34815e785ca6c5a46e4d260 (patch)
tree60c4a9ab7025f86375f6f3261c16732f8ff9e5b6
parent3cd9ad5a303a0d503492002c4af95becfa99af03 (diff)
fuse_file_aio_read(): convert to ->read_iter()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/fuse/file.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 66d2d5de19d2..a25fa9059faa 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -933,8 +933,7 @@ out:
933 return err; 933 return err;
934} 934}
935 935
936static ssize_t fuse_file_aio_read(struct kiocb *iocb, const struct iovec *iov, 936static ssize_t fuse_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
937 unsigned long nr_segs, loff_t pos)
938{ 937{
939 struct inode *inode = iocb->ki_filp->f_mapping->host; 938 struct inode *inode = iocb->ki_filp->f_mapping->host;
940 struct fuse_conn *fc = get_fuse_conn(inode); 939 struct fuse_conn *fc = get_fuse_conn(inode);
@@ -945,14 +944,14 @@ static ssize_t fuse_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
945 * i_size is up to date). 944 * i_size is up to date).
946 */ 945 */
947 if (fc->auto_inval_data || 946 if (fc->auto_inval_data ||
948 (pos + iov_length(iov, nr_segs) > i_size_read(inode))) { 947 (iocb->ki_pos + iov_iter_count(to) > i_size_read(inode))) {
949 int err; 948 int err;
950 err = fuse_update_attributes(inode, NULL, iocb->ki_filp, NULL); 949 err = fuse_update_attributes(inode, NULL, iocb->ki_filp, NULL);
951 if (err) 950 if (err)
952 return err; 951 return err;
953 } 952 }
954 953
955 return generic_file_aio_read(iocb, iov, nr_segs, pos); 954 return generic_file_read_iter(iocb, to);
956} 955}
957 956
958static void fuse_write_fill(struct fuse_req *req, struct fuse_file *ff, 957static void fuse_write_fill(struct fuse_req *req, struct fuse_file *ff,
@@ -3038,8 +3037,8 @@ out:
3038 3037
3039static const struct file_operations fuse_file_operations = { 3038static const struct file_operations fuse_file_operations = {
3040 .llseek = fuse_file_llseek, 3039 .llseek = fuse_file_llseek,
3041 .read = do_sync_read, 3040 .read = new_sync_read,
3042 .aio_read = fuse_file_aio_read, 3041 .read_iter = fuse_file_read_iter,
3043 .write = do_sync_write, 3042 .write = do_sync_write,
3044 .aio_write = fuse_file_aio_write, 3043 .aio_write = fuse_file_aio_write,
3045 .mmap = fuse_file_mmap, 3044 .mmap = fuse_file_mmap,