函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:static struct dentry *aafs_create(const char *name, umode_t mode, struct dentry *parent, void *data, void *link, const struct file_operations *fops, const struct inode_operations *iops)

返回类型:struct dentry

参数:

类型参数名称
const char *name
umode_tmode
struct dentry *parent
void *data
void *link
const struct file_operations *fops
const struct inode_operations *iops
270  AA_BUG(!name)
271  AA_BUG(!parent)
273  如果非mode按位与S_IFMT的值则mode等于mode按位与S_IALLUGO按位或S_IFREG
276  error等于simple_pin_fs( & aafs_ops, & aafs_mnt, & aafs_count)
277  如果error则返回:错误号
280  dir等于获得目录项的索引节点
282  inode_lock(dir)
283  dentry等于lookup_one_len(name, parent, strlen - Find the length of a string*@s: The string to be sized)
284  如果是错误
285  error等于错误
286  转到:fail_lock
289  如果d_really_is_positive - Determine if a dentry is really positive (ignoring fallthroughs)*@dentry: The dentry in question* Returns true if the dentry represents a name that maps to an inode* (ie
290  error等于负EEXIST
291  转到:fail_dentry
294  error等于__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
295  如果error则转到:fail_dentry
297  inode_unlock(dir)
299  返回:dentry
301  fail_dentry :
302  dput(dentry)
304  fail_lock :
305  inode_unlock(dir)
306  simple_release_fs( & aafs_mnt, & aafs_count)
308  返回:错误号
调用者
名称描述
aafs_create_fileaafs_create_file - create a file 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
aafs_create_diraafs_create_dir - create a directory in the apparmorfs filesystem*@name: name of dentry to create*@parent: parent directory for this dentry* see aafs_create
aafs_create_symlinkaafs_create_symlink - create a symlink in the apparmorfs filesystem*@name: name of dentry to create*@parent: parent directory for this dentry*@target: if symlink, symlink target string*@private: private data*@iops: struct of inode_operations that should
__aafs_ns_mkdir_entriesassumes cleanup in caller