Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\filemap.c Create Date:2022-07-28 14:03:33
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:generic_file_write_iter - write data to a file*@iocb: IO state structure*@from: iov_iter with data to write* This is a wrapper around __generic_file_write_iter() to be used by most* filesystems. It takes care of syncing the file in case of O_SYNC file

Proto:ssize_t generic_file_write_iter(struct kiocb *iocb, struct iov_iter *from)

Type:ssize_t

Parameter:

TypeParameterName
struct kiocb *iocb
struct iov_iter *from
3463  file = ki_filp
3464  inode = host
3467  inode_lock(inode)
3468  ret = Performs necessary checks before doing a write* Can adjust writing position or amount of bytes to write.* Returns appropriate error code that caller should return or* zero in case that write should be allowed.
3469  If ret > 0 Then ret = __generic_file_write_iter - write data to a file*@iocb: IO state structure (file, offset, etc.)*@from: iov_iter with data to write* This function does all the work needed for actually writing data to a* file
3471  inode_unlock(inode)
3473  If ret > 0 Then ret = Sync the bytes written if this was a synchronous write. Expect ki_pos* to already be updated for the write, and will return either the amount* of bytes passed in, or an error if syncing the file failed.
3475  Return ret