Commit 3f1b6947 authored by Mike Marshall's avatar Mike Marshall

Orangefs: set pos after generic_write_checks

if we are appending, generic_write_checks would have updated
pos to the end of the file...
Signed-off-by: default avatarMike Marshall <hubcap@omnibond.com>
parent 8092895f
......@@ -430,7 +430,7 @@ static ssize_t pvfs2_file_read_iter(struct kiocb *iocb, struct iov_iter *iter)
static ssize_t pvfs2_file_write_iter(struct kiocb *iocb, struct iov_iter *iter)
{
struct file *file = iocb->ki_filp;
loff_t pos = *(&iocb->ki_pos);
loff_t pos;
ssize_t rc;
BUG_ON(iocb->private);
......@@ -461,6 +461,13 @@ static ssize_t pvfs2_file_write_iter(struct kiocb *iocb, struct iov_iter *iter)
goto out;
}
/*
* if we are appending, generic_write_checks would have updated
* pos to the end of the file, so we will wait till now to set
* pos...
*/
pos = *(&iocb->ki_pos);
rc = do_readv_writev(PVFS_IO_WRITE,
file,
&pos,
......
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