Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\inode.c Create Date:2022-07-28 20:07:55
Last Modify:2020-03-18 19:19:59 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

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

Proto:int inode_init_always(struct super_block *sb, struct inode *inode)

Type:int

Parameter:

TypeParameterName
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  If s_xattr Then i_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  If security_inode_alloc(inode) Then Go to out
171  Process spin lock initialization( & _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  Return 0
204  out :
205  Return -ENOMEM
Caller
NameDescribe
alloc_inode