aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-04-03 14:13:46 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2014-05-06 17:39:39 -0400
commit50b5551d1719c8bce60c6d4027b814cfc72c2307 (patch)
tree2386b73f9cd2d279973a1c3dd1f8c1dfd4cad5d0
parentda56e45b6ee83b67a586c61819cd2b5cfd806eb8 (diff)
afs: switch to ->write_iter()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/afs/file.c4
-rw-r--r--fs/afs/internal.h3
-rw-r--r--fs/afs/write.c11
3 files changed, 8 insertions, 10 deletions
diff --git a/fs/afs/file.c b/fs/afs/file.c
index 26fd19bfccc3..932ce07948b3 100644
--- a/fs/afs/file.c
+++ b/fs/afs/file.c
@@ -32,9 +32,9 @@ const struct file_operations afs_file_operations = {
32 .release = afs_release, 32 .release = afs_release,
33 .llseek = generic_file_llseek, 33 .llseek = generic_file_llseek,
34 .read = new_sync_read, 34 .read = new_sync_read,
35 .write = do_sync_write, 35 .write = new_sync_write,
36 .read_iter = generic_file_read_iter, 36 .read_iter = generic_file_read_iter,
37 .aio_write = afs_file_write, 37 .write_iter = afs_file_write,
38 .mmap = generic_file_readonly_mmap, 38 .mmap = generic_file_readonly_mmap,
39 .splice_read = generic_file_splice_read, 39 .splice_read = generic_file_splice_read,
40 .fsync = afs_fsync, 40 .fsync = afs_fsync,
diff --git a/fs/afs/internal.h b/fs/afs/internal.h
index be75b500005d..d2f91bd615a9 100644
--- a/fs/afs/internal.h
+++ b/fs/afs/internal.h
@@ -747,8 +747,7 @@ extern int afs_write_end(struct file *file, struct address_space *mapping,
747extern int afs_writepage(struct page *, struct writeback_control *); 747extern int afs_writepage(struct page *, struct writeback_control *);
748extern int afs_writepages(struct address_space *, struct writeback_control *); 748extern int afs_writepages(struct address_space *, struct writeback_control *);
749extern void afs_pages_written_back(struct afs_vnode *, struct afs_call *); 749extern void afs_pages_written_back(struct afs_vnode *, struct afs_call *);
750extern ssize_t afs_file_write(struct kiocb *, const struct iovec *, 750extern ssize_t afs_file_write(struct kiocb *, struct iov_iter *);
751 unsigned long, loff_t);
752extern int afs_writeback_all(struct afs_vnode *); 751extern int afs_writeback_all(struct afs_vnode *);
753extern int afs_fsync(struct file *, loff_t, loff_t, int); 752extern int afs_fsync(struct file *, loff_t, loff_t, int);
754 753
diff --git a/fs/afs/write.c b/fs/afs/write.c
index a890db4b9898..ab6adfd52516 100644
--- a/fs/afs/write.c
+++ b/fs/afs/write.c
@@ -625,15 +625,14 @@ void afs_pages_written_back(struct afs_vnode *vnode, struct afs_call *call)
625/* 625/*
626 * write to an AFS file 626 * write to an AFS file
627 */ 627 */
628ssize_t afs_file_write(struct kiocb *iocb, const struct iovec *iov, 628ssize_t afs_file_write(struct kiocb *iocb, struct iov_iter *from)
629 unsigned long nr_segs, loff_t pos)
630{ 629{
631 struct afs_vnode *vnode = AFS_FS_I(file_inode(iocb->ki_filp)); 630 struct afs_vnode *vnode = AFS_FS_I(file_inode(iocb->ki_filp));
632 ssize_t result; 631 ssize_t result;
633 size_t count = iov_length(iov, nr_segs); 632 size_t count = iov_iter_count(from);
634 633
635 _enter("{%x.%u},{%zu},%lu,", 634 _enter("{%x.%u},{%zu},",
636 vnode->fid.vid, vnode->fid.vnode, count, nr_segs); 635 vnode->fid.vid, vnode->fid.vnode, count);
637 636
638 if (IS_SWAPFILE(&vnode->vfs_inode)) { 637 if (IS_SWAPFILE(&vnode->vfs_inode)) {
639 printk(KERN_INFO 638 printk(KERN_INFO
@@ -644,7 +643,7 @@ ssize_t afs_file_write(struct kiocb *iocb, const struct iovec *iov,
644 if (!count) 643 if (!count)
645 return 0; 644 return 0;
646 645
647 result = generic_file_aio_write(iocb, iov, nr_segs, pos); 646 result = generic_file_write_iter(iocb, from);
648 if (IS_ERR_VALUE(result)) { 647 if (IS_ERR_VALUE(result)) {
649 _leave(" = %zd", result); 648 _leave(" = %zd", result);
650 return result; 649 return result;