函数逻辑报告

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

函数名称:Put reference to dquot

函数原型:void dqput(struct dquot *dquot)

返回类型:void

参数:

类型参数名称
struct dquot *dquot
756  如果非dquot则返回
766  dqstats_inc(DQST_DROPS)
767  we_slept :
768  加自旋锁
769  如果atomic_read( & Use count )大于1则
771  atomic_dec( & Use count )
773  如果非sb_has_quota_active( superblock this applies to , USRQUOTA (uid) or GRPQUOTA (gid) or PRJQUOTA (projid) )且atomic_read( & Use count )恒等于1则wake_up( & dquot_ref_wq)
776  自旋锁解锁
777  返回
780  如果dquot_dirty(dquot)则
781  自旋锁解锁
783  ret等于write_dquot(dquot)
784  如果ret小于0则
785  quota_error( superblock this applies to , "Can't write quota structure (error %d). Quota may get out of sync!", ret)
794  转到:we_slept
796  如果st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from
797  自旋锁解锁
798  release_dquot(dquot)
799  转到:we_slept
801  atomic_dec( & Use count )
806  Add a dquot to the tail of the free list
807  自旋锁解锁
调用者
名称描述
dqput_all
invalidate_dquotsInvalidate all dquots on the list
dquot_scan_activeCall callback for every active dquot on given filesystem
dquot_writeback_dquotsWrite all dquot structures to quota files
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
remove_inode_dquot_refRemove references to dquots from inode and add dquot to list for freeing* if we have the last reference to dquot
put_dquot_listFree list of dquots* Dquots are removed from inodes and no new references can be got so we are* the only ones holding reference
dquot_get_dqblk
dquot_get_next_dqblk
dquot_set_dqblk