summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-02-09 18:58:52 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2014-04-02 05:19:34 +0200
commit41fc56d573c35a212688b12b48af8c303f9bb6d2 (patch)
tree049c1a885b2a67156b94ac9a7da848922966280a /mm
parentlustre: don't open-code kernel_recvmsg() (diff)
downloadlinux-41fc56d573c35a212688b12b48af8c303f9bb6d2.tar.xz
linux-41fc56d573c35a212688b12b48af8c303f9bb6d2.zip
kill the 4th argument of __generic_file_aio_write()
It's always equal to &iocb->ki_pos, where iocb is the value of the 1st argument. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'mm')
-rw-r--r--mm/filemap.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index c4730efa5d9e..ce2246dd90de 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -2222,14 +2222,14 @@ EXPORT_SYMBOL(generic_file_buffered_write);
* avoid syncing under i_mutex.
*/
ssize_t __generic_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
- unsigned long nr_segs, loff_t *ppos)
+ unsigned long nr_segs)
{
struct file *file = iocb->ki_filp;
struct address_space * mapping = file->f_mapping;
size_t ocount; /* original count */
size_t count; /* after file limit checks */
struct inode *inode = mapping->host;
- loff_t pos;
+ loff_t pos = iocb->ki_pos;
ssize_t written;
ssize_t err;
@@ -2239,7 +2239,6 @@ ssize_t __generic_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
return err;
count = ocount;
- pos = *ppos;
/* We can write back this queue in page reclaim */
current->backing_dev_info = mapping->backing_dev_info;
@@ -2266,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,
- ppos, count, ocount);
+ &iocb->ki_pos, count, ocount);
if (written < 0 || written == count)
goto out;
/*
@@ -2276,7 +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, ppos, count,
+ nr_segs, pos, &iocb->ki_pos, count,
written);
/*
* If generic_file_buffered_write() retuned a synchronous error
@@ -2310,7 +2309,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, ppos, count, written);
+ pos, &iocb->ki_pos, count, written);
}
out:
current->backing_dev_info = NULL;
@@ -2339,7 +2338,7 @@ ssize_t generic_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
BUG_ON(iocb->ki_pos != pos);
mutex_lock(&inode->i_mutex);
- ret = __generic_file_aio_write(iocb, iov, nr_segs, &iocb->ki_pos);
+ ret = __generic_file_aio_write(iocb, iov, nr_segs);
mutex_unlock(&inode->i_mutex);
if (ret > 0) {