函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mmon code

函数原型:static struct file *__shmem_file_setup(struct vfsmount *mnt, const char *name, loff_t size, unsigned long flags, unsigned int i_flags)

返回类型:struct file

参数:

类型参数名称
struct vfsmount *mnt
const char *name
loff_tsize
unsigned longflags
unsigned inti_flags
4099  如果是错误则返回:错误指示
4102  如果size小于0或size大于Page cache limit. The filesystems should put that into their s_maxbytes limits, otherwise bad things can happen in VM. 则返回:错误号
4105  如果shmem_acct_size(flags, size)则返回:错误号
4108  inode等于shmem_get_inode(mnt_sb, NULL, S_IFREG | S_IRWXUGO, 0, flags)
4110  如果此条件成立可能性小(为编译器优化)(!inode)则
4111  shmem_unacct_size(flags, size)
4112  返回:错误号
4114  i_flags或等于i_flags
4115  i_size等于size
4116  clear_nlink(inode)
4117  res等于错误号
4118  如果非是错误res等于alloc_file_pseudo(inode, mnt, name, O_RDWR, & shmem_file_operations)
4121  如果是错误放置一个索引节点
4123  返回:res
调用者
名称描述
shmem_kernel_file_setupshmem_kernel_file_setup - get an unlinked file living in tmpfs which must be* kernel internal. There will be NO LSM permission checks against the* underlying inode. So users of this interface must do LSM checks at a* higher layer
shmem_file_setupshmem_file_setup - get an unlinked file living in tmpfs*@name: name for dentry (to be seen in /proc//maps*@size: size to be set for the file*@flags: VM_NORESERVE suppresses pre-accounting of the entire object size
shmem_file_setup_with_mntshmem_file_setup_with_mnt - get an unlinked file living in tmpfs*@mnt: the tmpfs mount where the file will be created*@name: name for dentry (to be seen in /proc//maps*@size: size to be set for the file*@flags: VM_NORESERVE suppresses pre-accounting