Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\mbcache.c Create Date:2022-07-28 20:29:33
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__entry_find

Proto:static struct mb_cache_entry *__entry_find(struct mb_cache *cache, struct mb_cache_entry *entry, unsigned int key)

Type:struct mb_cache_entry

Parameter:

TypeParameterName
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  If entry && Not hlist_bl_unhashed( & Hash table list - protected by hash chain bitlock ) Then node = next
140  Else node = hlist_bl_first(head)
142  When node cycle
143  entry = hlist_bl_entry(node, structmb_cache_entry, e_hash_list)
146  atomic_inc( & e_refcnt)
147  Go to out
149  node = next
151  entry = NULL
152  out :
153  hlist_bl_unlock(head)
154  If old_entry Then mb_cache_entry_put(cache, old_entry)
157  Return entry
Caller
NameDescribe
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