Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:get_empty_dquot

Proto:static struct dquot *get_empty_dquot(struct super_block *sb, int type)

Type:struct dquot

Parameter:

TypeParameterName
struct super_block *sb
inttype
821  dquot = alloc_dquot(sb, type)
822  If Not dquot Then Return 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  Initialization list head
827  Initialization list head
828  INIT_HLIST_NODE( & Hash list in memory [dq_list_lock] )
829  Initialization list head
830  superblock this applies to = sb
831  ID this applies to (uid, gid, projid) = make_kqid_invalid - Explicitly make an invalid kqid*@type: The type of quota identifier* Returns an invalid kqid with the specified type.
832  atomic_set( & Use count , 1)
833  Process spin lock initialization( & Lock protecting dq_dqb changes )
835  Return dquot
Caller
NameDescribe
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