Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:aa_mk_null_file

Proto:static int aa_mk_null_file(struct dentry *parent)

Type:int

Parameter:

TypeParameterName
struct dentry *parent
2528  struct vfsmount * mount = NULL
2531  count = 0
2532  error = simple_pin_fs(s_type, & mount, & count)
2534  If error Then Return error
2537  inode_lock(d_inode - Get the actual inode of this dentry*@dentry: The dentry to query* This is the helper normal filesystems should use to get at their own inodes* in their own dentries and ignore the layering superimposed upon them.)
2538  dentry = lookup_one_len(NULL_FILE_NAME, parent, strlen - Find the length of a string*@s: The string to be sized)
2539  If IS_ERR(dentry) Then
2540  error = PTR_ERR(dentry)
2541  Go to out
2543  inode = obtain an inode
2544  If Not inode Then
2545  error = -ENOMEM
2546  Go to out1
2549  Stat data, not accessed from path walking = get_next_ino()
2550  i_mode = S_IFCHR | S_IRUGO | S_IWUGO
2551  i_atime = i_mtime = i_ctime = current_time(inode)
2552  init_special_inode(inode, S_IFCHR | S_IRUGO | S_IWUGO, MKDEV(MEM_MAJOR, 3))
2554  These are the low-level FS interfaces to the dcache..
2555  dentry = get a reference to a dentry
2556  mnt = mntget(mount)
2558  error = 0
2560  out1 :
2561  dput(dentry)
2562  out :
2563  inode_unlock(d_inode - Get the actual inode of this dentry*@dentry: The dentry to query* This is the helper normal filesystems should use to get at their own inodes* in their own dentries and ignore the layering superimposed upon them.)
2564  simple_release_fs( & mount, & count)
2565  Return error
Caller
NameDescribe
aa_create_aafsaa_create_aafs - create the apparmor security filesystem* dentries created here are released by aa_destroy_aafs* Returns: error on failure