Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:rhashtable_insert_one

Proto:static struct bucket_table *rhashtable_insert_one(struct rhashtable *ht, struct rhash_lock_head **bkt, struct bucket_table *tbl, unsigned int hash, struct rhash_head *obj, void *data)

Type:struct bucket_table

Parameter:

TypeParameterName
struct rhashtable *ht
struct rhash_lock_head **bkt
struct bucket_table *tbl
unsigned inthash
struct rhash_head *obj
void *data
539  If Not IS_ERR_OR_NULL(data) Then Return ERR_PTR( - EEXIST)
542  If PTR_ERR(data) != -EAGAIN && PTR_ERR(data) != -ENOENT Then Return ERR_CAST - Explicitly cast an error-valued pointer to another pointer type*@ptr: The pointer to cast.* Explicitly cast an error-valued pointer to another pointer type in such a* way as to make it clear that's what's going on.
545  new_tbl = rht_dereference_rcu(future_tbl, ht)
546  If new_tbl Then Return new_tbl
549  If PTR_ERR(data) != -ENOENT Then Return ERR_CAST - Explicitly cast an error-valued pointer to another pointer type*@ptr: The pointer to cast.* Explicitly cast an error-valued pointer to another pointer type in such a* way as to make it clear that's what's going on.
552  If Value for the false possibility is greater at compile time(ht_grow_above_max - returns true if table is above maximum*@ht: hash table*@tbl: current table) Then Return ERR_PTR( - E2BIG)
555  If Value for the false possibility is greater at compile time(ht_grow_above_100 - returns true if nelems > table-size*@ht: hash table*@tbl: current table) Then Return ERR_PTR( - EAGAIN)
558  head = rht_ptr(bkt, tbl, hash)
560  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)
561  If rhlist Then
564  list = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(obj, structrhlist_head, rhead)
565  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, NULL)
571  rht_assign_locked(bkt, obj)
573  atomic_inc( & nelems)
574  If ht_grow_above_75 - returns true if nelems > 0.75 * table-size*@ht: hash table*@tbl: current table Then schedule_work - put work task in global workqueue*@work: job to be done* Returns %false if @work was already on the kernel-global workqueue and* %true otherwise
577  Return NULL
Caller
NameDescribe
rhashtable_try_insert