函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__aafs_setup_d_inode - basic inode setup for apparmorfs*@dir: parent directory for the dentry*@dentry: dentry we are seting the inode up for*@mode: permissions the file should have*@data: data to store on inode

函数原型:static int __aafs_setup_d_inode(struct inode *dir, struct dentry *dentry, umode_t mode, void *data, char *link, const struct file_operations *fops, const struct inode_operations *iops)

返回类型:int

参数:

类型参数名称
struct inode *dir
struct dentry *dentry
umode_tmode
void *data
char *link
const struct file_operations *fops
const struct inode_operations *iops
216  inode等于取新的索引节点
218  AA_BUG(!dir)
219  AA_BUG(!dentry)
221  如果非inode则返回:负ENOMEM
224  Stat data, not accessed from path walking 等于get_next_ino()
225  i_mode等于mode
226  i_atime等于i_mtime等于i_ctime等于current_time(inode)
227  s or device private pointer 等于data
228  如果S_ISDIR(mode)则
229  i_op等于如果iopsiops否则simple_dir_inode_operations
230  rmer ->i_op->default_file_ops 等于simple_dir_operations
231  inc_nlink(inode)
232  inc_nlink(dir)
233  否则如果S_ISLNK(mode)则
234  i_op等于如果iopsiops否则simple_symlink_inode_operations
235  i_link等于link
236  否则
237  rmer ->i_op->default_file_ops 等于fops
239  为目录项建立索引
240  获得目录项引用
242  返回:0
调用者
名称描述
aafs_createaafs_create - create a dentry in the apparmorfs filesystem*@name: name of dentry to create*@mode: permissions the file should have*@parent: parent directory for this dentry*@data: data to store on inode
ns_mkdir_op