Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Don't operate on ranges the page cache doesn't support, and don't exceed the* LFS limits. If pos is under the limit it becomes a short access. If it* exceeds the limit we return -EFBIG.

Proto:static int generic_write_check_limits(struct file *file, loff_t pos, loff_t *count)

Type:int

Parameter:

TypeParameterName
struct file *file
loff_tpos
loff_t *count
2908  inode = host
2909  max_size = s_maxbytes
2910  limit = rlimit(RLIMIT_FSIZE)
2912  If limit != RLIM_INFINITY Then
2913  If pos >= limit Then
2915  Return -EFBIG
2917  count = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value( * count, limit - pos)
2920  If Not (f_flags & O_LARGEFILE) Then max_size = MAX_NON_LFS
2923  If Value for the false possibility is greater at compile time(pos >= max_size) Then Return -EFBIG
2926  count = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value( * count, max_size - pos)
2928  Return 0
Caller
NameDescribe
generic_write_checksPerforms 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.
generic_remap_checksPerforms necessary checks before doing a clone.* Can adjust amount of bytes to clone via @req_count argument.* Returns appropriate error code that caller should return or* zero in case the clone should be allowed.
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.