Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:We don't have to be afraid of deadlocks as we never have quotas on quota* files...

Proto:int qtree_write_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot)

Type:int

Parameter:

TypeParameterName
struct qtree_mem_dqinfo *info
struct dquot *dquot
375  type = USRQUOTA (uid) or GRPQUOTA (gid) or PRJQUOTA (projid)
376  sb = superblock this applies to
378  ddquot = getdqbuf(Size of quota entry in quota file )
380  If Not ddquot Then Return -ENOMEM
384  If Not Offset of dquot on disk [dq_lock, stable once set] Then
385  ret = Wrapper for inserting quota structure into tree
386  If ret < 0 Then
387  quota_error(sb, "Error %zd occurred while creating quota", ret)
389  kfree(ddquot)
390  Return ret
393  spin_lock( & Lock protecting dq_dqb changes )
394  mem2disk_dqblk(ddquot, dquot)
395  spin_unlock( & Lock protecting dq_dqb changes )
396  ret = quota_write(sb, type, ddquot, Size of quota entry in quota file , Offset of dquot on disk [dq_lock, stable once set] )
398  If ret != Size of quota entry in quota file Then
399  quota_error(sb, "dquota write failed")
400  If ret >= 0 Then ret = -ENOSPC
402  Else
403  ret = 0
405  dqstats_inc(DQST_WRITES)
406  kfree(ddquot)
408  Return ret