Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\rhashtable.c Create Date:2022-07-28 06:25:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:rhashtable_rehash_one

Proto:static int rhashtable_rehash_one(struct rhashtable *ht, struct rhash_lock_head **bkt, unsigned int old_hash)

Type:int

Parameter:

TypeParameterName
struct rhashtable *ht
struct rhash_lock_head **bkt
unsigned intold_hash
219  old_tbl = rht_dereference(tbl, ht)
220  new_tbl = rhashtable_last_table(ht, old_tbl)
221  err = -EAGAIN
223  struct rhash_head __rcu * * pprev = NULL
226  If nest Then Go to out
229  err = -ENOENT
233  err = 0
234  next = rht_dereference_bucket(next, old_tbl, old_hash)
236  If rht_is_a_nulls(next) Then Break
239  pprev = next
242  If err Then Go to out
245  new_hash = head_hashfn(ht, new_tbl, entry)
247  rht_lock_nested(new_tbl, & buckets[new_hash], For trivial one-depth nesting of a lock-class, the following* global define can be used. (Subsystems with multiple levels* of nesting should define their own lock-nesting subclasses.))
249  head = rht_ptr(buckets + new_hash, new_tbl, new_hash)
251  RCU_INIT_POINTER() - initialize an RCU protected pointer*@p: The pointer to be initialized.*@v: The value to initialized the pointer to.* Initialize an RCU-protected pointer in special cases where readers(next, head)
253  rht_assign_unlock(new_tbl, & buckets[new_hash], entry)
255  If pprev Then cu_assign_pointer() - assign to RCU-protected pointer*@p: pointer to assign to*@v: value to assign (publish)* Assigns the specified value to the specified RCU-protected* pointer, ensuring that any concurrent RCU readers will see* any prior initialization( * pprev, next)
257  Else rht_assign_locked(bkt, next)
261  out :
262  Return err
Caller
NameDescribe
rhashtable_rehash_chain