__generic_file_aio_write — write data to a file
ssize_t fsfunc__generic_file_aio_write ( | struct kiocb * iocb, |
| const struct iovec * iov, | |
| unsigned long nr_segs, | |
loff_t * ppos); |
iocbIO state structure (file, offset, etc.)
iovvector with data to write
nr_segsnumber of segments in the vector
pposposition where to write
This function does all the work needed for actually writing data to a file. It does all basic checks, removes SUID from the file, updates modification times and calls proper subroutines depending on whether we do direct IO or a standard buffered write.
It expects i_mutex to be grabbed unless we work on a block device or similar object which does not need locking at all.
This function does *not* take care of syncing data in case of O_SYNC write. A caller has to handle it. This is mainly due to the fact that we want to avoid syncing under i_mutex.