函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:get_empty_dquot

函数原型:static struct dquot *get_empty_dquot(struct super_block *sb, int type)

返回类型:struct dquot

参数:

类型参数名称
struct super_block *sb
inttype
821  dquot等于alloc_dquot(sb, type)
822  如果非dquot则返回:NULL
825  mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & dquot IO lock )
826  初始化链表头
827  初始化链表头
828  INIT_HLIST_NODE( & Hash list in memory [dq_list_lock] )
829  初始化链表头
830  superblock this applies to 等于sb
831  ID this applies to (uid, gid, projid) 等于按类型生成kqid
832  atomic_set( & Use count , 1)
833  spin_lock_init( & Lock protecting dq_dqb changes )
835  返回:dquot
调用者
名称描述
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