]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
afs: switch to ->write_iter()
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 3 Apr 2014 18:13:46 +0000 (14:13 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 23 Apr 2014 17:51:58 +0000 (13:51 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/afs/file.c
fs/afs/internal.h
fs/afs/write.c

index 26fd19bfccc30f109ffa554a709520eaa736515a..932ce07948b387d7aa75dffb3a9de1e21f1f50b8 100644 (file)
@@ -32,9 +32,9 @@ const struct file_operations afs_file_operations = {
        .release        = afs_release,
        .llseek         = generic_file_llseek,
        .read           = new_sync_read,
-       .write          = do_sync_write,
+       .write          = new_sync_write,
        .read_iter      = generic_file_read_iter,
-       .aio_write      = afs_file_write,
+       .write_iter     = afs_file_write,
        .mmap           = generic_file_readonly_mmap,
        .splice_read    = generic_file_splice_read,
        .fsync          = afs_fsync,
index be75b500005d0d4f68b2d6e3855e71660016353d..d2f91bd615a9304f905d8712fda5d284268ba5be 100644 (file)
@@ -747,8 +747,7 @@ extern int afs_write_end(struct file *file, struct address_space *mapping,
 extern int afs_writepage(struct page *, struct writeback_control *);
 extern int afs_writepages(struct address_space *, struct writeback_control *);
 extern void afs_pages_written_back(struct afs_vnode *, struct afs_call *);
-extern ssize_t afs_file_write(struct kiocb *, const struct iovec *,
-                             unsigned long, loff_t);
+extern ssize_t afs_file_write(struct kiocb *, struct iov_iter *);
 extern int afs_writeback_all(struct afs_vnode *);
 extern int afs_fsync(struct file *, loff_t, loff_t, int);
 
index a890db4b9898fc1d888c5e7285da55db85e4da54..ab6adfd525168800524349791c061512a47a7d81 100644 (file)
@@ -625,15 +625,14 @@ void afs_pages_written_back(struct afs_vnode *vnode, struct afs_call *call)
 /*
  * write to an AFS file
  */
-ssize_t afs_file_write(struct kiocb *iocb, const struct iovec *iov,
-                      unsigned long nr_segs, loff_t pos)
+ssize_t afs_file_write(struct kiocb *iocb, struct iov_iter *from)
 {
        struct afs_vnode *vnode = AFS_FS_I(file_inode(iocb->ki_filp));
        ssize_t result;
-       size_t count = iov_length(iov, nr_segs);
+       size_t count = iov_iter_count(from);
 
-       _enter("{%x.%u},{%zu},%lu,",
-              vnode->fid.vid, vnode->fid.vnode, count, nr_segs);
+       _enter("{%x.%u},{%zu},",
+              vnode->fid.vid, vnode->fid.vnode, count);
 
        if (IS_SWAPFILE(&vnode->vfs_inode)) {
                printk(KERN_INFO
@@ -644,7 +643,7 @@ ssize_t afs_file_write(struct kiocb *iocb, const struct iovec *iov,
        if (!count)
                return 0;
 
-       result = generic_file_aio_write(iocb, iov, nr_segs, pos);
+       result = generic_file_write_iter(iocb, from);
        if (IS_ERR_VALUE(result)) {
                _leave(" = %zd", result);
                return result;