函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\filemap.c Create Date:2022-07-27 15:25:51
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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.

函数原型:static int generic_write_check_limits(struct file *file, loff_t pos, loff_t *count)

返回类型:int

参数:

类型参数名称
struct file *file
loff_tpos
loff_t *count
2908  inode等于host
2909  max_size等于s_maxbytes
2910  limit等于rlimit(RLIMIT_FSIZE)
2912  如果limit不等于RLIM_INFINITY
2913  如果pos大于等于limit
2915  返回:负EFBIG
2917  count等于两数取小( * count, limit - pos)
2920  如果非f_flags按位与O_LARGEFILE的值则max_size等于MAX_NON_LFS
2923  如果此条件成立可能性小(为编译器优化)(pos >= max_size)则返回:负EFBIG
2926  count等于两数取小( * count, max_size - pos)
2928  返回:0
调用者
名称描述
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.