函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\mbcache.c Create Date:2022-07-29 11:04:35
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__entry_find

函数原型:static struct mb_cache_entry *__entry_find(struct mb_cache *cache, struct mb_cache_entry *entry, unsigned int key)

返回类型:struct mb_cache_entry

参数:

类型参数名称
struct mb_cache *cache
struct mb_cache_entry *entry
unsigned intkey
132  old_entry等于entry
136  head等于mb_cache_entry_head(cache, key)
137  hlist_bl_lock(head)
138  如果entry且非hlist_bl_unhashed( & Hash table list - protected by hash chain bitlock )则node等于next
140  否则node等于hlist_bl_first(head)
142 node循环
143  entry等于hlist_bl_entry(node, structmb_cache_entry, e_hash_list)
146  atomic_inc( & e_refcnt)
147  转到:out
149  node等于next
151  entry = NULL
152  out :
153  hlist_bl_unlock(head)
154  如果old_entrymb_cache_entry_put(cache, old_entry)
157  返回:entry
调用者
名称描述
mb_cache_entry_find_firstmb_cache_entry_find_first - find the first reusable entry with the given key*@cache: cache where we should search*@key: key to look for* Search in @cache for a reusable entry with key @key. Grabs reference to the
mb_cache_entry_find_nextmb_cache_entry_find_next - find next reusable entry with the same key*@cache: cache where we should search*@entry: entry to start search from* Finds next reusable entry in the hash chain which has the same key as @entry