Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:obtain an inode from a mounted file system

Proto:struct inode *iget_locked(struct super_block *sb, unsigned long ino)

Type:struct inode

Parameter:

TypeParameterName
struct super_block *sb
unsigned longino
1174  head = inode_hashtable + hash(sb, ino)
1176  again :
1177  spin_lock( & inode_hash_lock)
1178  inode = d_inode_fast is the fast path version of find_inode, see the comment at* iget_locked for details.
1179  spin_unlock( & inode_hash_lock)
1180  If inode Then
1181  If IS_ERR(inode) Then Return NULL
1183  writeback.h requires fs.h; it, too, is not included from here.
1185  put an inode
1186  Go to again
1188  Return inode
1191  inode = alloc_inode(sb)
1192  If inode Then
1195  spin_lock( & inode_hash_lock)
1197  old = d_inode_fast is the fast path version of find_inode, see the comment at* iget_locked for details.
1198  If Not old Then
1202  hlist_add_head( & i_hash, head)
1210  Return inode
1218  spin_unlock( & inode_hash_lock)
1219  destroy_inode(inode)
1220  If IS_ERR(old) Then Return NULL
1222  inode = old
1223  writeback.h requires fs.h; it, too, is not included from here.
1225  put an inode
1226  Go to again
1229  Return inode