Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Performs common checks before doing a file copy/clone* from @file_in to @file_out.

Proto:int generic_file_rw_checks(struct file *file_in, struct file *file_out)

Type:int

Parameter:

TypeParameterName
struct file *file_in
struct file *file_out
3052  inode_in = file_inode(file_in)
3053  inode_out = file_inode(file_out)
3056  If S_ISDIR(i_mode) || S_ISDIR(i_mode) Then Return -EISDIR
3058  If Not S_ISREG(i_mode) || Not S_ISREG(i_mode) Then Return -EINVAL
3061  If Not (f_mode & le is open for reading ) || Not (f_mode & le is open for writing ) || f_flags & O_APPEND Then Return -EBADF
3066  Return 0
Caller
NameDescribe
generic_copy_file_checksPerforms necessary checks before doing a file copy* Can adjust amount of bytes to copy via @req_count argument.* Returns appropriate error code that caller should return or* zero in case the copy should be allowed.