函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ry_create_dir - recursively create a directory entry in the securityfs*@fs_dir: aa_sfs_entry (and all child entries) to build (NOT NULL)*@parent: the parent dentry in the securityfs* Use entry_remove_dir to remove entries created with this fn.

函数原型:static int __init entry_create_dir(struct aa_sfs_entry *fs_dir, struct dentry *parent)

返回类型:int

参数:

类型参数名称
struct aa_sfs_entry *fs_dir
struct dentry *parent
2459  dir等于securityfs_create_dir - create a directory in the securityfs filesystem*@name: a pointer to a string containing the name of the directory to* create.*@parent: a pointer to the parent dentry for this file. This should be a* directory dentry if set
2460  如果是错误则返回:错误
2462  dentry等于dir
2464 fs_filename循环
2465  如果v_type恒等于AA_SFS_TYPE_DIRerror等于ry_create_dir - recursively create a directory entry in the securityfs*@fs_dir: aa_sfs_entry (and all child entries) to build (NOT NULL)*@parent: the parent dentry in the securityfs* Use entry_remove_dir to remove entries created with this fn.
2467  否则error等于ry_create_file - create a file entry in the apparmor securityfs*@fs_file: aa_sfs_entry to build an entry for (NOT NULL)*@parent: the parent dentry in the securityfs* Use entry_remove_file to remove entries created with this fn.
2469  如果error则转到:failed
2473  返回:0
2475  failed :
2476  entry_remove_dir(fs_dir)
2478  返回:error
调用者
名称描述
entry_create_dirry_create_dir - recursively create a directory entry in the securityfs*@fs_dir: aa_sfs_entry (and all child entries) to build (NOT NULL)*@parent: the parent dentry in the securityfs* Use entry_remove_dir to remove entries created with this fn.
aa_create_aafsaa_create_aafs - create the apparmor security filesystem* dentries created here are released by aa_destroy_aafs* Returns: error on failure