forked from Minki/linux
generic_file_direct_write(): get rid of ppos argument
always equal to &iocb->ki_pos. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
867c4f9329
commit
5cb6c6c7eb
@ -1640,7 +1640,7 @@ static ssize_t __btrfs_direct_write(struct kiocb *iocb,
|
||||
loff_t endbyte;
|
||||
int err;
|
||||
|
||||
written = generic_file_direct_write(iocb, iov, &nr_segs, pos, &iocb->ki_pos,
|
||||
written = generic_file_direct_write(iocb, iov, &nr_segs, pos,
|
||||
count, ocount);
|
||||
|
||||
if (written < 0 || written == count)
|
||||
|
@ -1143,8 +1143,7 @@ static ssize_t fuse_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
|
||||
goto out;
|
||||
|
||||
if (file->f_flags & O_DIRECT) {
|
||||
written = generic_file_direct_write(iocb, iov, &nr_segs,
|
||||
pos, &iocb->ki_pos,
|
||||
written = generic_file_direct_write(iocb, iov, &nr_segs, pos,
|
||||
count, ocount);
|
||||
if (written < 0 || written == count)
|
||||
goto out;
|
||||
|
@ -2375,7 +2375,7 @@ relock:
|
||||
|
||||
if (direct_io) {
|
||||
written = generic_file_direct_write(iocb, iov, &nr_segs, *ppos,
|
||||
ppos, count, ocount);
|
||||
count, ocount);
|
||||
if (written < 0) {
|
||||
ret = written;
|
||||
goto out_dio;
|
||||
|
@ -699,7 +699,7 @@ xfs_file_dio_aio_write(
|
||||
|
||||
trace_xfs_file_direct_write(ip, count, iocb->ki_pos, 0);
|
||||
ret = generic_file_direct_write(iocb, iovp,
|
||||
&nr_segs, pos, &iocb->ki_pos, count, ocount);
|
||||
&nr_segs, pos, count, ocount);
|
||||
|
||||
out:
|
||||
xfs_rw_iunlock(ip, iolock);
|
||||
|
@ -2395,7 +2395,7 @@ extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsig
|
||||
extern ssize_t __generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long);
|
||||
extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, loff_t);
|
||||
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, size_t, size_t);
|
||||
extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *,
|
||||
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);
|
||||
|
@ -1985,7 +1985,7 @@ EXPORT_SYMBOL(pagecache_write_end);
|
||||
|
||||
ssize_t
|
||||
generic_file_direct_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, size_t ocount)
|
||||
{
|
||||
struct file *file = iocb->ki_filp;
|
||||
@ -2046,7 +2046,7 @@ generic_file_direct_write(struct kiocb *iocb, const struct iovec *iov,
|
||||
i_size_write(inode, pos);
|
||||
mark_inode_dirty(inode);
|
||||
}
|
||||
*ppos = pos;
|
||||
iocb->ki_pos = pos;
|
||||
}
|
||||
out:
|
||||
return written;
|
||||
@ -2265,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,
|
||||
&iocb->ki_pos, count, ocount);
|
||||
count, ocount);
|
||||
if (written < 0 || written == count)
|
||||
goto out;
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user