Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:rhashtable_try_insert

Proto:static void *rhashtable_try_insert(struct rhashtable *ht, const void *key, struct rhash_head *obj)

Type:void

Parameter:

TypeParameterName
struct rhashtable *ht
const void *key
struct rhash_head *obj
589  new_tbl = fetch RCU-protected pointer for dereferencing(tbl)
591  Do
592  tbl = new_tbl
593  hash = rht_head_hashfn(ht, tbl, obj, p)
594  If cu_access_pointer() - fetch RCU pointer with no dereferencing*@p: The pointer to read* Return the value of the specified RCU-protected pointer, but omit the* lockdep checks for being in an RCU read-side critical section(future_tbl) Then bkt = rht_bucket_var(tbl, hash)
597  Else bkt = rht_bucket_insert(ht, tbl, hash)
599  If (bkt == NULL) Then
601  data = ERR_PTR( - EAGAIN)
602  Else
611  rht_unlock(tbl, bkt)
613  When Not IS_ERR_OR_NULL(new_tbl) cycle
615  If PTR_ERR(data) == -EAGAIN Then data = ERR_PTR(rhashtable_insert_rehash(ht, tbl) ? : - EAGAIN)
619  Return data
Caller
NameDescribe
rhashtable_insert_slow