函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\inode.c Create Date:2022-07-29 10:38:01
Last Modify:2020-03-18 19:19:59 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:de_init_always - perform inode structure initialisation*@sb: superblock inode belongs to*@inode: inode to initialise* These are initializations that need to be done on every inode* allocation as the fields are not initialised by slab allocation.

函数原型:int inode_init_always(struct super_block *sb, struct inode *inode)

返回类型:int

参数:

类型参数名称
struct super_block *sb
struct inode *inode
134  static const struct file_operations no_open_fops = {open = no_open}
135  mapping等于i_data
137  i_sb等于sb
138  i_blkbits等于s_blocksize_bits
139  i_flags等于0
140  atomic_set( & i_count, 1)
141  i_op等于empty_iops
142  rmer ->i_op->default_file_ops 等于no_open_fops
143  __i_nlink等于1
144  i_opflags等于0
145  如果s_xattri_opflags或等于IOP_XATTR
147  i_uid_write(inode, 0)
148  i_gid_write(inode, 0)
149  atomic_set( & i_writecount, 0)
150  i_size等于0
151  i_write_hint等于WRITE_LIFE_NOT_SET
152  i_blocks等于0
153  i_bytes等于0
154  i_generation等于0
155  i_pipe = NULL
156  i_bdev = NULL
157  i_cdev = NULL
158  i_link = NULL
159  i_dir_seq等于0
160  i_rdev等于0
161  jiffies of first dirtying 等于0
169  如果security_inode_alloc(inode)则转到:out
171  spin_lock_init( & _blocks, i_bytes, maybe i_size )
172  lockdep_set_class( & _blocks, i_bytes, maybe i_size , & i_lock_key)
174  init_rwsem( & i_rwsem)
175  lockdep_set_class( & i_rwsem, & i_mutex_key)
177  atomic_set( & i_dio_count, 0)
179  a_ops等于Empty aops. Can be used for the cases where the user does not* define any of the address_space operations.
180  host等于inode
181  flags等于0
182  wb_err等于0
183  atomic_set( & i_mmap_writable, 0)
187  This is non-atomic. Only to be used before the mapping is activated.* Probably needs a barrier...
188  private_data = NULL
189  writeback_index等于0
190  s or device private pointer = NULL
191  i_mapping等于mapping
192  INIT_HLIST_HEAD( & i_dentry)
194  i_acl等于i_default_acl等于ACL_NOT_CACHED
200  i_flctx = NULL
201  this_cpu_inc(nr_inodes)
203  返回:0
204  out :
205  返回:负ENOMEM
调用者
名称描述
alloc_inode