Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\dcookies.c Create Date:2022-07-28 20:34:31
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:dcookie_init

Proto:static int dcookie_init(void)

Type:int

Parameter:Nothing

227  err = -ENOMEM
229  dcookie_cache = kmem_cache_create - Create a cache.*@name: A string which is used in /proc/slabinfo to identify this cache.*@size: The size of objects to be created in this cache.*@align: The required alignment for the objects.*@flags: SLAB flags
233  If Not dcookie_cache Then Go to out
236  dcookie_hashtable = Allocation memory
237  If Not dcookie_hashtable Then Go to out_kmem
240  err = 0
247  hash_size = PAGE_SIZE / sizeof(structlist_head)
248  hash_bits = 0
249  Do
250  hash_bits++
251  When hash_size >> hash_bits != 0 cycle
252  hash_bits--
258  hash_size = 1UL << hash_bits
261  d = dcookie_hashtable
262  i = hash_size
263  Do
264  Initialization list head
265  d++
266  i--
267  When i cycle
269  out :
270  Return err
271  out_kmem :
272  kmem_cache_destroy(dcookie_cache)
273  Go to out
Caller
NameDescribe
dcookie_register