Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:This is the system call interface. This communicates with* the user-level programs. Currently this only supports diskquota* calls. Maybe we need to add the process quotas etc. in the future,* but we probably should use rlimits for that.

Proto:int kernel_quotactl(unsigned int cmd, const char __user *special, qid_t id, void __user *addr)

Type:int

Parameter:

TypeParameterName
unsigned intcmd
const char __user *special
qid_tid
void __user *addr
823  struct super_block * sb = NULL
824  struct path path, * pathp = NULL
827  cmds = cmd >> SUBCMDSHIFT
828  type = cmd & Command definitions for the 'quotactl' system call.* The commands are broken into a main command defined below* and a subcommand that is used to convey the type of* quota that is being manipulated (see above).
830  If type >= MAXQUOTAS Then Return -EINVAL
838  If Not special Then
839  If cmds == sync disk copy of a filesystems quotas Then Return quota_sync_all(type)
841  Return -ENODEV
849  If cmds == urn quotas on Then
850  ret = user_path_at(Special value used to indicateopenat should use the currentworking directory. , addr, llow links at the end | rce terminal automount , & path)
851  If ret Then pathp = ERR_PTR(ret)
853  Else pathp = path
857  sb = look up a superblock on which quota ops will be performed* - use the name of a block device to find the superblock thereon
858  If IS_ERR(sb) Then
859  ret = PTR_ERR(sb)
860  Go to out
863  ret = Copy parameters and call proper function
865  If Not Return true if quotactl command is manipulating quota on/off state Then drop_super(sb)
867  Else drop_super_exclusive(sb)
869  out :
870  If pathp && Not IS_ERR(pathp) Then path_put - put a reference to a path*@path: path to put the reference to* Given a path decrement the reference count to the dentry and the vfsmount.
872  Return ret
Caller
NameDescribe
SYSCALL_DEFINE4
COMPAT_SYSCALL_DEFINE4