generic_file_direct_write(): get rid of ppos argument
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 12 Feb 2014 01:58:20 +0000 (20:58 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 2 Apr 2014 03:19:35 +0000 (23:19 -0400)
always equal to &iocb->ki_pos.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/btrfs/file.c
fs/fuse/file.c
fs/ocfs2/file.c
fs/xfs/xfs_file.c
include/linux/fs.h
mm/filemap.c

index f6032a2bfab91f8cf533bb8317772a1d15c0652c..8ed4b165abbd2b3b4bb996ee4273c14fe0bce831 100644 (file)
@@ -1640,7 +1640,7 @@ static ssize_t __btrfs_direct_write(struct kiocb *iocb,
        loff_t endbyte;
        int err;
 
-       written = generic_file_direct_write(iocb, iov, &nr_segs, pos, &iocb->ki_pos,
+       written = generic_file_direct_write(iocb, iov, &nr_segs, pos,
                                            count, ocount);
 
        if (written < 0 || written == count)
index a91d3b4d32f36c55aee5e860f89ea048f42acf6c..fd06d1ebc2ebc1ded380befd984faa6c7ccbaf2f 100644 (file)
@@ -1143,8 +1143,7 @@ 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, &iocb->ki_pos,
+               written = generic_file_direct_write(iocb, iov, &nr_segs, pos, 
                                                    count, ocount);
                if (written < 0 || written == count)
                        goto out;
index 89099cce14fe1748c327de6a030a8dfc44184cf9..77b8a742866f86c3d6b97ba2129e87d75a4868e6 100644 (file)
@@ -2375,7 +2375,7 @@ relock:
 
        if (direct_io) {
                written = generic_file_direct_write(iocb, iov, &nr_segs, *ppos,
-                                                   ppos, count, ocount);
+                                                   count, ocount);
                if (written < 0) {
                        ret = written;
                        goto out_dio;
index 175ce58fbfa3ecf6c3c05176859e42a026f7e076..e593554ce65e7159f7695025f4f1afbf57164b9c 100644 (file)
@@ -699,7 +699,7 @@ xfs_file_dio_aio_write(
 
        trace_xfs_file_direct_write(ip, count, iocb->ki_pos, 0);
        ret = generic_file_direct_write(iocb, iovp,
-                       &nr_segs, pos, &iocb->ki_pos, count, ocount);
+                       &nr_segs, pos, count, ocount);
 
 out:
        xfs_rw_iunlock(ip, iolock);
index 830e37420f5ef0af064a621608235e4cffcbd0ee..9dfd7c7ff8e3a3e6cf371521938117a340838925 100644 (file)
@@ -2395,7 +2395,7 @@ extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsig
 extern ssize_t __generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long);
 extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, loff_t);
 extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *,
-               unsigned long *, loff_t, loff_t *, size_t, size_t);
+               unsigned long *, loff_t, size_t, size_t);
 extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *,
                unsigned long, loff_t, size_t, ssize_t);
 extern ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos);
index 9d515a1a237218b939403f14d7ae629e6506d029..93e9cf576452c93473b0cefbe6b1e1f83cc5af51 100644 (file)
@@ -1985,7 +1985,7 @@ EXPORT_SYMBOL(pagecache_write_end);
 
 ssize_t
 generic_file_direct_write(struct kiocb *iocb, const struct iovec *iov,
-               unsigned long *nr_segs, loff_t pos, loff_t *ppos,
+               unsigned long *nr_segs, loff_t pos,
                size_t count, size_t ocount)
 {
        struct file     *file = iocb->ki_filp;
@@ -2046,7 +2046,7 @@ generic_file_direct_write(struct kiocb *iocb, const struct iovec *iov,
                        i_size_write(inode, pos);
                        mark_inode_dirty(inode);
                }
-               *ppos = pos;
+               iocb->ki_pos = pos;
        }
 out:
        return written;
@@ -2265,7 +2265,7 @@ ssize_t __generic_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
                ssize_t written_buffered;
 
                written = generic_file_direct_write(iocb, iov, &nr_segs, pos,
-                                                       &iocb->ki_pos, count, ocount);
+                                                       count, ocount);
                if (written < 0 || written == count)
                        goto out;
                /*