函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Get 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

函数原型:struct dquot *dqget(struct super_block *sb, struct kqid qid)

返回类型:struct dquot

参数:

类型参数名称
struct super_block *sb
struct kqidqid
848  hashent等于hashfn(sb, qid)
849  struct dquot * dquot, * empty = NULL
851  如果非qid_has_mapping - Report if a qid maps into a user namespace.*@ns: The user namespace to see if a value maps into.*@qid: The kernel internal quota identifier to test.则返回:错误号
854  如果非sb_has_quota_active(sb, USRQUOTA (uid) or GRPQUOTA (gid) or PRJQUOTA (projid) )则返回:错误号
856  we_slept :
857  加自旋锁
858  加自旋锁
859  如果非sb_has_quota_active(sb, USRQUOTA (uid) or GRPQUOTA (gid) or PRJQUOTA (projid) )则
860  自旋锁解锁
861  自旋锁解锁
862  dquot等于错误号
863  转到:out
865  自旋锁解锁
867  dquot等于find_dquot(hashent, sb, qid)
868  如果非dquot
869  如果非empty
872  如果非empty进程调度
874  转到:we_slept
876  dquot等于empty
877  empty = NULL
878  ID this applies to (uid, gid, projid) 等于qid
880  put_inuse(dquot)
882  Following list functions expect dq_list_lock to be held
883  自旋锁解锁
884  dqstats_inc(DQST_LOOKUPS)
885  否则
886  如果非atomic_read( & Use count )则remove_free_dquot(dquot)
888  atomic_inc( & Use count )
889  自旋锁解锁
890  dqstats_inc(DQST_CACHE_HITS)
891  dqstats_inc(DQST_LOOKUPS)
895  End of list functions needing dq_list_lock
897  如果非st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from
900  err等于acquire_dquot(dquot)
901  如果err小于0则
903  dquot等于错误号
904  转到:out
911  smp_rmb()
915  out :
916  如果emptydo_destroy_dquot(empty)
919  返回:dquot
调用者
名称描述
__dquot_initialize
dquot_transferWrapper for transferring ownership of an inode for uid/gid only* Called from FSXXX_setattr()
dquot_get_dqblk
dquot_get_next_dqblk
dquot_set_dqblk