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:Called with the inode lock held.

Proto:static struct inode *find_inode(struct super_block *sb, struct hlist_head *head, int (*test)(struct inode *, void *), void *data)

Type:struct inode

Parameter:

TypeParameterName
struct super_block *sb
struct hlist_head *head
int (*test
void *data
817  struct inode * inode = NULL
819  repeat :
821  If i_sb != sb Then Continue
823  If Not test(inode, data) Then Continue
825  spin_lock( & _blocks, i_bytes, maybe i_size )
826  If Misc & (Set when inode is about to be freed but still has dirty pages or buffers attached or the inode itself is still dirty | Must be set when calling write_inode_now() if i_count is zero) Then
827  __wait_on_freeing_inode(inode)
828  Go to repeat
830  If Value for the false possibility is greater at compile time(Misc & I_CREATING) Then
831  spin_unlock( & _blocks, i_bytes, maybe i_size )
832  Return ERR_PTR( - ESTALE)
834  __iget(inode)
835  spin_unlock( & _blocks, i_bytes, maybe i_size )
836  Return inode
838  Return NULL
Caller
NameDescribe
inode_insert5de_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
ilookup5_nowaitlookup5_nowait - search for an inode in the inode cache*@sb: super block of file system to search*@hashval: hash value (usually inode number) to search for*@test: callback used for comparisons between inodes*@data: opaque data pointer to pass to @test