Commit fcacafd2 authored by Al Viro's avatar Al Viro

kill the 5th argument of generic_file_buffered_write()

same story - it's &iocb->ki_pos in all cases
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 41fc56d5
...@@ -978,8 +978,7 @@ static ssize_t ceph_aio_write(struct kiocb *iocb, const struct iovec *iov, ...@@ -978,8 +978,7 @@ static ssize_t ceph_aio_write(struct kiocb *iocb, const struct iovec *iov,
* can not run at the same time * can not run at the same time
*/ */
written = generic_file_buffered_write(iocb, iov, nr_segs, written = generic_file_buffered_write(iocb, iov, nr_segs,
pos, &iocb->ki_pos, pos, count, 0);
count, 0);
mutex_unlock(&inode->i_mutex); mutex_unlock(&inode->i_mutex);
} }
......
...@@ -2383,7 +2383,7 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb, ...@@ -2383,7 +2383,7 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
} else { } else {
current->backing_dev_info = file->f_mapping->backing_dev_info; current->backing_dev_info = file->f_mapping->backing_dev_info;
written = generic_file_buffered_write(iocb, iov, nr_segs, *ppos, written = generic_file_buffered_write(iocb, iov, nr_segs, *ppos,
ppos, count, 0); count, 0);
current->backing_dev_info = NULL; current->backing_dev_info = NULL;
} }
......
...@@ -738,7 +738,7 @@ xfs_file_buffered_aio_write( ...@@ -738,7 +738,7 @@ xfs_file_buffered_aio_write(
write_retry: write_retry:
trace_xfs_file_buffered_write(ip, count, iocb->ki_pos, 0); trace_xfs_file_buffered_write(ip, count, iocb->ki_pos, 0);
ret = generic_file_buffered_write(iocb, iovp, nr_segs, 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 * If we just got an ENOSPC, try to write back all dirty inodes to
......
...@@ -2397,7 +2397,7 @@ extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsi ...@@ -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 *, 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, loff_t *, size_t, size_t);
extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *, 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_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 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, extern int generic_segment_checks(const struct iovec *iov,
......
...@@ -2183,7 +2183,7 @@ static ssize_t generic_perform_write(struct file *file, ...@@ -2183,7 +2183,7 @@ static ssize_t generic_perform_write(struct file *file,
ssize_t ssize_t
generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov, 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) size_t count, ssize_t written)
{ {
struct file *file = iocb->ki_filp; struct file *file = iocb->ki_filp;
...@@ -2195,7 +2195,7 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov, ...@@ -2195,7 +2195,7 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov,
if (likely(status >= 0)) { if (likely(status >= 0)) {
written += status; written += status;
*ppos = pos + status; iocb->ki_pos = pos + status;
} }
return written ? written : status; return written ? written : status;
...@@ -2275,8 +2275,7 @@ ssize_t __generic_file_aio_write(struct kiocb *iocb, const struct iovec *iov, ...@@ -2275,8 +2275,7 @@ ssize_t __generic_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
pos += written; pos += written;
count -= written; count -= written;
written_buffered = generic_file_buffered_write(iocb, iov, written_buffered = generic_file_buffered_write(iocb, iov,
nr_segs, pos, &iocb->ki_pos, count, nr_segs, pos, count, written);
written);
/* /*
* If generic_file_buffered_write() retuned a synchronous error * If generic_file_buffered_write() retuned a synchronous error
* then we want to return the number of bytes which were * 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, ...@@ -2309,7 +2308,7 @@ ssize_t __generic_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
} }
} else { } else {
written = generic_file_buffered_write(iocb, iov, nr_segs, written = generic_file_buffered_write(iocb, iov, nr_segs,
pos, &iocb->ki_pos, count, written); pos, count, written);
} }
out: out:
current->backing_dev_info = NULL; current->backing_dev_info = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment