Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Turn quotas on on a device

Proto:static int vfs_setup_quota_inode(struct inode *inode, int type)

Type:int

Parameter:

TypeParameterName
struct inode *inode
inttype
2303  sb = i_sb
2304  dqopt = sb_dqopt(sb)
2306  If Not S_ISREG(i_mode) Then Return -EACCES
2308  If IS_RDONLY(inode) Then Return -EROFS
2310  If Does kernel know about any quota information for given sb + type? Then Return -EBUSY
2313  inodes of quotafiles [type] = igrab(inode)
2314  If Not inodes of quotafiles [type] Then Return -EIO
2316  If Not ( Flags for diskquotas on this device & DQUOT_QUOTA_SYS_FILE) Then
2320  inode_lock(inode)
2321  i_flags |= Inode is not counted to quota
2322  inode_unlock(inode)
2327  Release all quotas referenced by inode.* This function only be called on inode free or converting* a file to quota file, no other users for the i_dquot in* both cases, so we needn't call synchronize_srcu() after* clearing i_dquot.
2329  Return 0
Caller
NameDescribe
dquot_load_quota_inodeMore powerful function for turning on quotas on given quota inode allowing* setting of individual quota flags