Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:We know there's a real path component here of at least* one character.

Proto:static inline u64 hash_name(const void *salt, const char *name)

Type:u64

Parameter:

TypeParameterName
const void *salt
const char *name
2033  hash = Hash courtesy of the R5 hash in reiserfs modulo sign bits (salt)
2034  len = 0
2036  c = (unsigned char) * name
2037  Do
2038  len++
2039  hash = partial hash update function. Assume roughly 4 bits per character
2040  c = name[len]
2041  When c && c != '/' cycle
2042  Return hashlen_create(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., len)
Caller
NameDescribe
link_path_walkName resolution.* This is the basic name resolution function, turning a pathname into* the final dentry. We expect 'base' to be positive and a directory.* Returns 0 and nd will have valid dentry and mnt on success.