Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:vfs_read

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

Type:ssize_t

Parameter:

TypeParameterName
struct file *file
char __user *buf
size_tcount
loff_t *pos
450  If Not (f_mode & le is open for reading ) Then Return -EBADF
452  If Not (f_mode & Has read method(s) ) Then Return -EINVAL
454  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
457  ret = rw_verify_area(generic data direction definitions , file, pos, count)
458  If Not ret Then
459  If count > MAX_RW_COUNT Then count = MAX_RW_COUNT
461  ret = __vfs_read(file, buf, count, pos)
462  If ret > 0 Then
466  inc_syscr(current process)
469  Return ret
Caller
NameDescribe
kernel_read
ksys_read
ksys_pread64
read_code