函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\namei.c Create Date:2022-07-29 10:34:56
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Return the hash of a string of known length

函数原型:unsigned int full_name_hash(const void *salt, const char *name, unsigned int len)

返回类型:unsigned int

参数:

类型参数名称
const void *salt
const char *name
unsigned intlen
2004  hash等于Hash courtesy of the R5 hash in reiserfs modulo sign bits (salt)
2005 len自减循环
2006  hash等于partial hash update function. Assume roughly 4 bits per character
2007  返回:Finally: cut down the number of bits to a int value (and try to avoid* losing bits). This also has the property (wanted by the dcache)* that the msbits make a good hash table index.
调用者
名称描述
smk_find_entrysmk_find_entry - find a label on the list, return the list entry*@string: a text string that might be a Smack label* Returns a pointer to the entry in the label list that* matches the passed string or NULL if not found.
tomoyo_get_namemoyo_get_name - Allocate permanent memory for string data.*@name: The string to store into the permernent memory.* Returns pointer to "struct tomoyo_path_info" on success, NULL otherwise.
tomoyo_fill_path_infomoyo_fill_path_info - Fill in "struct tomoyo_path_info" members.*@ptr: Pointer to "struct tomoyo_path_info" to fill in.* The caller sets "struct tomoyo_path_info"->name.
lookup_one_len_common
d_hash_and_lookupd_hash_and_lookup - hash the qstr then search for a dentry*@dir: Directory to search in*@name: qstr of name we wish to find* On lookup failure NULL is returned; on bad name - ERR_PTR(-error)
test_hash_init