kill the 5th argument of generic_file_buffered_write()
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 9 Feb 2014 18:37:49 +0000 (13:37 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 2 Apr 2014 03:19:34 +0000 (23:19 -0400)
same story - it's &iocb->ki_pos in all cases

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

index 09c7afe32e496c7dfe20d527106c7a184248c3ca..a798db5e5e39f65cc88a31f0dc51afdb6b5f70b0 100644 (file)
@@ -978,8 +978,7 @@ retry_snap:
                 * can not run at the same time
                 */
                written = generic_file_buffered_write(iocb, iov, nr_segs,
-                                                     pos, &iocb->ki_pos,
-                                                     count, 0);
+                                                     pos, count, 0);
                mutex_unlock(&inode->i_mutex);
        }
 
index 51632c40e896fd0b7c4e4c87b2afc5dc4f418aca..89099cce14fe1748c327de6a030a8dfc44184cf9 100644 (file)
@@ -2383,7 +2383,7 @@ relock:
        } else {
                current->backing_dev_info = file->f_mapping->backing_dev_info;
                written = generic_file_buffered_write(iocb, iov, nr_segs, *ppos,
-                                                     ppos, count, 0);
+                                                     count, 0);
                current->backing_dev_info = NULL;
        }
 
index 64b48eade91d14c79408b6863f199e9181350f81..175ce58fbfa3ecf6c3c05176859e42a026f7e076 100644 (file)
@@ -738,7 +738,7 @@ xfs_file_buffered_aio_write(
 write_retry:
        trace_xfs_file_buffered_write(ip, count, iocb->ki_pos, 0);
        ret = generic_file_buffered_write(iocb, iovp, nr_segs,
-                       pos, &iocb->ki_pos, count, 0);
+                       pos, count, 0);
 
        /*
         * If we just got an ENOSPC, try to write back all dirty inodes to
index e677d1e1189f9631d4ce7a0c34f01b3c7401bdb9..830e37420f5ef0af064a621608235e4cffcbd0ee 100644 (file)
@@ -2397,7 +2397,7 @@ extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsi
 extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *,
                unsigned long *, loff_t, loff_t *, size_t, size_t);
 extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *,
-               unsigned long, loff_t, loff_t *, size_t, ssize_t);
+               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);
 extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos);
 extern int generic_segment_checks(const struct iovec *iov,
index ce2246dd90de5dfa9e1a57137a08b6331249f8df..9d515a1a237218b939403f14d7ae629e6506d029 100644 (file)
@@ -2183,7 +2183,7 @@ again:
 
 ssize_t
 generic_file_buffered_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, ssize_t written)
 {
        struct file *file = iocb->ki_filp;
@@ -2195,7 +2195,7 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov,
 
        if (likely(status >= 0)) {
                written += status;
-               *ppos = pos + status;
+               iocb->ki_pos = pos + status;
        }
        
        return written ? written : status;
@@ -2275,8 +2275,7 @@ ssize_t __generic_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
                pos += written;
                count -= written;
                written_buffered = generic_file_buffered_write(iocb, iov,
-                                               nr_segs, pos, &iocb->ki_pos, count,
-                                               written);
+                                               nr_segs, pos, count, written);
                /*
                 * If generic_file_buffered_write() retuned a synchronous error
                 * then we want to return the number of bytes which were
@@ -2309,7 +2308,7 @@ ssize_t __generic_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
                }
        } else {
                written = generic_file_buffered_write(iocb, iov, nr_segs,
-                               pos, &iocb->ki_pos, count, written);
+                               pos, count, written);
        }
 out:
        current->backing_dev_info = NULL;