函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\rhashtable.c Create Date:2022-07-27 07:22:17
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:rhashtable_insert_rehash

函数原型:static int rhashtable_insert_rehash(struct rhashtable *ht, struct bucket_table *tbl)

返回类型:int

参数:

类型参数名称
struct rhashtable *ht
struct bucket_table *tbl
438  old_tbl等于rht_dereference_rcu(tbl, ht)
440  size等于size
442  err等于负EBUSY
444  如果ht_grow_above_75 - returns true if nelems > 0.75 * table-size*@ht: hash table*@tbl: current tablesize乘等于2
447  否则如果old_tbl不等于tbl则转到:fail
450  err等于负ENOMEM
452  new_tbl等于bucket_table_alloc(ht, size, DOC: Useful GFP flag combinations* Useful GFP flag combinations* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~* Useful GFP flag combinations that are commonly used. It is recommended* that subsystems start with one of these combinations and then set/clear | DOC: Action modifiers* Action modifiers* ~~~~~~~~~~~~~~~~* %__GFP_NOWARN suppresses allocation failure reports.* %__GFP_COMP address compound page metadata.* %__GFP_ZERO returns a zeroed page on success.)
453  如果(new_tbl == NULL)则转到:fail
456  err等于rhashtable_rehash_attach(ht, tbl, new_tbl)
457  如果err
458  bucket_table_free(new_tbl)
459  如果err恒等于负EEXISTerr等于0
461  否则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
464  返回:err
466  fail :
468  如果此条件成立可能性大(为编译器优化)(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))则返回:0
472  如果err恒等于负ENOMEMschedule_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
475  返回:err
调用者
名称描述
rhashtable_try_insert