函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:hashfn

函数原型:static inline unsigned int hashfn(const struct super_block *sb, struct kqid qid)

返回类型:unsigned int

参数:

类型参数名称
const struct super_block *sb
struct kqidqid
264  id等于from_kqid( & userns count is 1 for root user, 1 for init_uts_ns,* and 1 for... ?, qid)
265  type等于 USRQUOTA (uid) or GRPQUOTA (gid) or PRJQUOTA (projid)
268  tmp等于sb右移L1 cache line size 位按位异或id的值乘MAXQUOTAStype的差
269  返回:tmptmp右移dq_hash_bits位的值按位与dq_hash_mask
调用者
名称描述
insert_dquot_hashFollowing list functions expect dq_list_lock to be held
dqgetGet reference to dquot* Locking is slightly tricky here. We are guarded from parallel quotaoff()* destroying our dquot by:* a) checking for quota flags under dq_list_lock and* b) getting a reference to dquot before we release dq_list_lock