Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:de_insert5 - obtain an inode from a mounted file system*@inode: pre-allocated inode to use for insert to cache*@hashval: hash value (usually inode number) to get*@test: callback used for comparisons between inodes*@set: callback used to initialize a new

Proto:struct inode *inode_insert5(struct inode *inode, unsigned long hashval, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *data)

Type:struct inode

Parameter:

TypeParameterName
struct inode *inode
unsigned longhashval
int (*test
int (*set
void *data
1074  head = inode_hashtable + hash(i_sb, hashval)
1076  creating = Misc & I_CREATING
1078  again :
1079  spin_lock( & inode_hash_lock)
1080  old = Called with the inode lock held.
1081  If Value for the false possibility is greater at compile time(old) Then
1086  spin_unlock( & inode_hash_lock)
1087  If IS_ERR(old) Then Return NULL
1089  writeback.h requires fs.h; it, too, is not included from here.
1091  put an inode
1092  Go to again
1094  Return old
1097  If set && Value for the false possibility is greater at compile time(set(inode, data)) Then
1098  inode = NULL
1099  Go to unlock
1106  spin_lock( & _blocks, i_bytes, maybe i_size )
1107  Misc |= Serves as both a mutex and completion notification
1108  hlist_add_head( & i_hash, head)
1109  spin_unlock( & _blocks, i_bytes, maybe i_size )
1110  If Not creating Then de_sb_list_add - add inode to the superblock list of inodes*@inode: inode to add
1112  unlock :
1113  spin_unlock( & inode_hash_lock)
1115  Return inode
Caller
NameDescribe
iget5_lockedobtain an inode from a mounted file system
insert_inode_locked4