* can not run at the same time
*/
written = generic_file_buffered_write(iocb, iov, nr_segs,
- pos, &iocb->ki_pos,
- count, 0);
+ pos, count, 0);
mutex_unlock(&inode->i_mutex);
}
} else {
current->backing_dev_info = file->f_mapping->backing_dev_info;
written = generic_file_buffered_write(iocb, iov, nr_segs, *ppos,
- ppos, count, 0);
+ count, 0);
current->backing_dev_info = NULL;
}
write_retry:
trace_xfs_file_buffered_write(ip, count, iocb->ki_pos, 0);
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
extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *,
unsigned long *, loff_t, loff_t *, size_t, size_t);
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_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos);
extern int generic_segment_checks(const struct iovec *iov,
ssize_t
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)
{
struct file *file = iocb->ki_filp;
if (likely(status >= 0)) {
written += status;
- *ppos = pos + status;
+ iocb->ki_pos = pos + status;
}
return written ? written : status;
pos += written;
count -= written;
written_buffered = generic_file_buffered_write(iocb, iov,
- nr_segs, pos, &iocb->ki_pos, count,
- written);
+ nr_segs, pos, count, written);
/*
* If generic_file_buffered_write() retuned a synchronous error
* then we want to return the number of bytes which were
}
} else {
written = generic_file_buffered_write(iocb, iov, nr_segs,
- pos, &iocb->ki_pos, count, written);
+ pos, count, written);
}
out:
current->backing_dev_info = NULL;