diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-02-09 12:58:52 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-04-01 23:19:34 -0400 |
commit | 41fc56d573c35a212688b12b48af8c303f9bb6d2 (patch) | |
tree | 049c1a885b2a67156b94ac9a7da848922966280a /mm | |
parent | b2f42cfeeb0452ca3e004c3014cda99b53554d47 (diff) |
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.c | 13 |
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); | |||
2222 | * avoid syncing under i_mutex. | 2222 | * avoid syncing under i_mutex. |
2223 | */ | 2223 | */ |
2224 | ssize_t __generic_file_aio_write(struct kiocb *iocb, const struct iovec *iov, | 2224 | ssize_t __generic_file_aio_write(struct kiocb *iocb, const struct iovec *iov, |
2225 | unsigned long nr_segs, loff_t *ppos) | 2225 | unsigned long nr_segs) |
2226 | { | 2226 | { |
2227 | struct file *file = iocb->ki_filp; | 2227 | struct file *file = iocb->ki_filp; |
2228 | struct address_space * mapping = file->f_mapping; | 2228 | struct address_space * mapping = file->f_mapping; |
2229 | size_t ocount; /* original count */ | 2229 | size_t ocount; /* original count */ |
2230 | size_t count; /* after file limit checks */ | 2230 | size_t count; /* after file limit checks */ |
2231 | struct inode *inode = mapping->host; | 2231 | struct inode *inode = mapping->host; |
2232 | loff_t pos; | 2232 | loff_t pos = iocb->ki_pos; |
2233 | ssize_t written; | 2233 | ssize_t written; |
2234 | ssize_t err; | 2234 | ssize_t err; |
2235 | 2235 | ||
@@ -2239,7 +2239,6 @@ ssize_t __generic_file_aio_write(struct kiocb *iocb, const struct iovec *iov, | |||
2239 | return err; | 2239 | return err; |
2240 | 2240 | ||
2241 | count = ocount; | 2241 | count = ocount; |
2242 | pos = *ppos; | ||
2243 | 2242 | ||
2244 | /* We can write back this queue in page reclaim */ | 2243 | /* We can write back this queue in page reclaim */ |
2245 | current->backing_dev_info = mapping->backing_dev_info; | 2244 | 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, | |||
2266 | ssize_t written_buffered; | 2265 | ssize_t written_buffered; |
2267 | 2266 | ||
2268 | written = generic_file_direct_write(iocb, iov, &nr_segs, pos, | 2267 | written = generic_file_direct_write(iocb, iov, &nr_segs, pos, |
2269 | ppos, count, ocount); | 2268 | &iocb->ki_pos, count, ocount); |
2270 | if (written < 0 || written == count) | 2269 | if (written < 0 || written == count) |
2271 | goto out; | 2270 | goto out; |
2272 | /* | 2271 | /* |
@@ -2276,7 +2275,7 @@ ssize_t __generic_file_aio_write(struct kiocb *iocb, const struct iovec *iov, | |||
2276 | pos += written; | 2275 | pos += written; |
2277 | count -= written; | 2276 | count -= written; |
2278 | written_buffered = generic_file_buffered_write(iocb, iov, | 2277 | written_buffered = generic_file_buffered_write(iocb, iov, |
2279 | nr_segs, pos, ppos, count, | 2278 | nr_segs, pos, &iocb->ki_pos, count, |
2280 | written); | 2279 | written); |
2281 | /* | 2280 | /* |
2282 | * If generic_file_buffered_write() retuned a synchronous error | 2281 | * 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, | |||
2310 | } | 2309 | } |
2311 | } else { | 2310 | } else { |
2312 | written = generic_file_buffered_write(iocb, iov, nr_segs, | 2311 | written = generic_file_buffered_write(iocb, iov, nr_segs, |
2313 | pos, ppos, count, written); | 2312 | pos, &iocb->ki_pos, count, written); |
2314 | } | 2313 | } |
2315 | out: | 2314 | out: |
2316 | current->backing_dev_info = NULL; | 2315 | current->backing_dev_info = NULL; |
@@ -2339,7 +2338,7 @@ ssize_t generic_file_aio_write(struct kiocb *iocb, const struct iovec *iov, | |||
2339 | BUG_ON(iocb->ki_pos != pos); | 2338 | BUG_ON(iocb->ki_pos != pos); |
2340 | 2339 | ||
2341 | mutex_lock(&inode->i_mutex); | 2340 | mutex_lock(&inode->i_mutex); |
2342 | ret = __generic_file_aio_write(iocb, iov, nr_segs, &iocb->ki_pos); | 2341 | ret = __generic_file_aio_write(iocb, iov, nr_segs); |
2343 | mutex_unlock(&inode->i_mutex); | 2342 | mutex_unlock(&inode->i_mutex); |
2344 | 2343 | ||
2345 | if (ret > 0) { | 2344 | if (ret > 0) { |