Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:rhashtable_insert_rehash

Proto:static int rhashtable_insert_rehash(struct rhashtable *ht, struct bucket_table *tbl)

Type:int

Parameter:

TypeParameterName
struct rhashtable *ht
struct bucket_table *tbl
438  old_tbl = rht_dereference_rcu(tbl, ht)
440  size = size
442  err = -EBUSY
444  If ht_grow_above_75 - returns true if nelems > 0.75 * table-size*@ht: hash table*@tbl: current table Then size *= 2
447  Else if old_tbl != tbl Then Go to 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  If (new_tbl == NULL) Then Go to fail
456  err = rhashtable_rehash_attach(ht, tbl, new_tbl)
457  If err Then
458  bucket_table_free(new_tbl)
459  If err == -EEXIST Then err = 0
461  Else 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  Return err
466  fail :
468  If Value is more likely to compile time(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 Return 0
472  If err == -ENOMEM 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
475  Return err
Caller
NameDescribe
rhashtable_try_insert