函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Called with the inode lock held.

函数原型:static struct inode *find_inode(struct super_block *sb, struct hlist_head *head, int (*test)(struct inode *, void *), void *data)

返回类型:struct inode

参数:

类型参数名称
struct super_block *sb
struct hlist_head *head
int (*test
void *data
817  struct inode * inode = NULL
819  repeat :
821  如果i_sb不等于sb则继续下一循环
823  如果非test(inode, data)则继续下一循环
825  加自旋锁
826  如果Misc 按位与I_FREEING按位或I_WILL_FREE的值则
827  __wait_on_freeing_inode(inode)
828  转到:repeat
830  如果此条件成立可能性小(为编译器优化)(Misc & I_CREATING)则
831  自旋锁解锁
832  返回:错误号
834  __iget(inode)
835  自旋锁解锁
836  返回:inode
838  返回:NULL
调用者
名称描述
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