函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\quota\quota.c Create Date:2022-07-29 11:10:18
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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.

函数原型:int kernel_quotactl(unsigned int cmd, const char __user *special, qid_t id, void __user *addr)

返回类型:int

参数:

类型参数名称
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  如果type大于等于MAXQUOTAS则返回:负EINVAL
838  如果非special
839  如果cmds恒等于sync disk copy of a filesystems quotas 则返回:quota_sync_all(type)
841  返回:负ENODEV
849  如果cmds恒等于urn quotas on
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  如果retpathp等于错误号
853  否则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  如果是错误
859  ret等于错误
860  转到:out
863  ret等于Copy parameters and call proper function
865  如果非Return true if quotactl command is manipulating quota on/off state drop_super(sb)
867  否则drop_super_exclusive(sb)
869  out :
870  如果pathp且非是错误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  返回:ret
调用者
名称描述
SYSCALL_DEFINE4
COMPAT_SYSCALL_DEFINE4