Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\read_write.c Create Date:2022-07-28 20:01:21
Last Modify:2020-03-18 10:18:51 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:vfs_write

Proto:ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_t *pos)

Type:ssize_t

Parameter:

TypeParameterName
struct file *file
const char __user *buf
size_tcount
loff_t *pos
546  If Not (f_mode & le is open for writing ) Then Return -EBADF
548  If Not (f_mode & Has write method(s) ) Then Return -EINVAL
550  If Value for the false possibility is greater at compile time(!access_ok - Checks if a user space pointer is valid*@addr: User space pointer to start of block to check*@size: Size of block to check* Context: User context only. This function may sleep if pagefaults are* enabled.(buf, count)) Then Return -EFAULT
553  ret = rw_verify_area(WRITE, file, pos, count)
554  If Not ret Then
555  If count > MAX_RW_COUNT Then count = MAX_RW_COUNT
557  file_start_write(file)
558  ret = __vfs_write(file, buf, count, pos)
559  If ret > 0 Then
563  inc_syscw(current process)
564  file_end_write(file)
567  Return ret
Caller
NameDescribe
kernel_write
ksys_write
ksys_pwrite64