diff options
-rw-r--r-- | fs/block_dev.c | 2 | ||||
-rw-r--r-- | fs/ext4/file.c | 2 | ||||
-rw-r--r-- | fs/udf/file.c | 2 | ||||
-rw-r--r-- | include/linux/fs.h | 3 | ||||
-rw-r--r-- | mm/filemap.c | 13 |
5 files changed, 10 insertions, 12 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index 1e86823a9cbd..764bd3b8d2fa 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -1518,7 +1518,7 @@ ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov, | |||
1518 | BUG_ON(iocb->ki_pos != pos); | 1518 | BUG_ON(iocb->ki_pos != pos); |
1519 | 1519 | ||
1520 | blk_start_plug(&plug); | 1520 | blk_start_plug(&plug); |
1521 | ret = __generic_file_aio_write(iocb, iov, nr_segs, &iocb->ki_pos); | 1521 | ret = __generic_file_aio_write(iocb, iov, nr_segs); |
1522 | if (ret > 0) { | 1522 | if (ret > 0) { |
1523 | ssize_t err; | 1523 | ssize_t err; |
1524 | 1524 | ||
diff --git a/fs/ext4/file.c b/fs/ext4/file.c index 1a5073959f32..d564bcfb23c5 100644 --- a/fs/ext4/file.c +++ b/fs/ext4/file.c | |||
@@ -146,7 +146,7 @@ ext4_file_dio_write(struct kiocb *iocb, const struct iovec *iov, | |||
146 | overwrite = 1; | 146 | overwrite = 1; |
147 | } | 147 | } |
148 | 148 | ||
149 | ret = __generic_file_aio_write(iocb, iov, nr_segs, &iocb->ki_pos); | 149 | ret = __generic_file_aio_write(iocb, iov, nr_segs); |
150 | mutex_unlock(&inode->i_mutex); | 150 | mutex_unlock(&inode->i_mutex); |
151 | 151 | ||
152 | if (ret > 0) { | 152 | if (ret > 0) { |
diff --git a/fs/udf/file.c b/fs/udf/file.c index 1037637957c7..d2c170f8b035 100644 --- a/fs/udf/file.c +++ b/fs/udf/file.c | |||
@@ -171,7 +171,7 @@ static ssize_t udf_file_aio_write(struct kiocb *iocb, const struct iovec *iov, | |||
171 | } else | 171 | } else |
172 | up_write(&iinfo->i_data_sem); | 172 | up_write(&iinfo->i_data_sem); |
173 | 173 | ||
174 | retval = __generic_file_aio_write(iocb, iov, nr_segs, &iocb->ki_pos); | 174 | retval = __generic_file_aio_write(iocb, iov, nr_segs); |
175 | mutex_unlock(&inode->i_mutex); | 175 | mutex_unlock(&inode->i_mutex); |
176 | 176 | ||
177 | if (retval > 0) { | 177 | if (retval > 0) { |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 2a5b1744f80a..e677d1e1189f 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -2392,8 +2392,7 @@ extern int generic_file_remap_pages(struct vm_area_struct *, unsigned long addr, | |||
2392 | unsigned long size, pgoff_t pgoff); | 2392 | unsigned long size, pgoff_t pgoff); |
2393 | int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk); | 2393 | int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk); |
2394 | extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t); | 2394 | extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t); |
2395 | extern ssize_t __generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, | 2395 | extern ssize_t __generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long); |
2396 | loff_t *); | ||
2397 | extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, loff_t); | 2396 | extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, loff_t); |
2398 | extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *, | 2397 | extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *, |
2399 | unsigned long *, loff_t, loff_t *, size_t, size_t); | 2398 | unsigned long *, loff_t, loff_t *, size_t, size_t); |
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) { |