Function report |
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 activity | Download SCCT | Chinese |
Name: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
Proto:struct dquot *dqget(struct super_block *sb, struct kqid qid)
Type:struct dquot
Parameter:
Type | Parameter | Name |
---|---|---|
struct super_block * | sb | |
struct kqid | qid |
854 | If Not sb_has_quota_active(sb, USRQUOTA (uid) or GRPQUOTA (gid) or PRJQUOTA (projid) ) Then Return ERR_PTR( - ESRCH) |
856 | we_slept : |
857 | spin_lock( & There are five quota SMP locks:* * dq_list_lock protects all lists with quotas and quota formats) |
858 | spin_lock( & dq_state_lock) |
859 | If Not sb_has_quota_active(sb, USRQUOTA (uid) or GRPQUOTA (gid) or PRJQUOTA (projid) ) Then |
860 | spin_unlock( & dq_state_lock) |
861 | spin_unlock( & There are five quota SMP locks:* * dq_list_lock protects all lists with quotas and quota formats) |
863 | Go to out |
865 | spin_unlock( & dq_state_lock) |
867 | dquot = find_dquot(hashent, sb, qid) |
868 | If Not dquot Then |
869 | If Not empty Then |
870 | spin_unlock( & There are five quota SMP locks:* * dq_list_lock protects all lists with quotas and quota formats) |
874 | Go to we_slept |
877 | empty = NULL |
883 | spin_unlock( & There are five quota SMP locks:* * dq_list_lock protects all lists with quotas and quota formats) |
884 | dqstats_inc(DQST_LOOKUPS) |
885 | Else |
886 | If Not atomic_read( & Use count ) Then remove_free_dquot(dquot) |
888 | atomic_inc( & Use count ) |
889 | spin_unlock( & There are five quota SMP locks:* * dq_list_lock protects all lists with quotas and quota formats) |
891 | dqstats_inc(DQST_LOOKUPS) |
900 | err = acquire_dquot(dquot) |
901 | If err < 0 Then |
911 | smp_rmb() |
915 | out : |
916 | If empty Then do_destroy_dquot(empty) |
919 | Return dquot |
Name | Describe |
---|---|
__dquot_initialize | |
dquot_transfer | Wrapper for transferring ownership of an inode for uid/gid only* Called from FSXXX_setattr() |
dquot_get_dqblk | |
dquot_get_next_dqblk | |
dquot_set_dqblk |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |