Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\apparmor\apparmorfs.c Create Date:2022-07-28 19:49:55
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__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

Proto: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)

Type:int

Parameter:

TypeParameterName
struct inode *dir
struct dentry *dentry
umode_tmode
void *data
char *link
const struct file_operations *fops
const struct inode_operations *iops
216  inode = obtain an inode
218  AA_BUG(!dir)
219  AA_BUG(!dentry)
221  If Not inode Then Return -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  If S_ISDIR(mode) Then
229  i_op = If iops Then iops Else simple_dir_inode_operations
230  rmer ->i_op->default_file_ops = simple_dir_operations
231  inc_nlink(inode)
232  inc_nlink(dir)
233  Else if S_ISLNK(mode) Then
234  i_op = If iops Then iops Else simple_symlink_inode_operations
235  i_link = link
236  Else
237  rmer ->i_op->default_file_ops = fops
239  These are the low-level FS interfaces to the dcache..
240  get a reference to a dentry
242  Return 0
Caller
NameDescribe
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