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:look up a superblock on which quota ops will be performed* - use the name of a block device to find the superblock thereon

Proto:static struct super_block *quotactl_block(const char __user *special, int cmd)

Type:struct super_block

Parameter:

TypeParameterName
const char __user *special
intcmd
789  tmp = getname(special)
791  If IS_ERR(tmp) Then Return ERR_CAST - Explicitly cast an error-valued pointer to another pointer type*@ptr: The pointer to cast.* Explicitly cast an error-valued pointer to another pointer type in such a* way as to make it clear that's what's going on.
793  bdev = lookup_bdev - lookup a struct block_device by name*@pathname: special file representing the block device* Get a reference to the blockdevice at @pathname in the current* namespace if possible and return it. Return ERR_PTR(error)* otherwise.
794  putname(tmp)
795  If IS_ERR(bdev) Then Return ERR_CAST - Explicitly cast an error-valued pointer to another pointer type*@ptr: The pointer to cast.* Explicitly cast an error-valued pointer to another pointer type in such a* way as to make it clear that's what's going on.
797  If Return true if quotactl command is manipulating quota on/off state Then sb = get_super_exclusive_thawed - get thawed superblock of a device*@bdev: device to get the superblock for* Scans the superblock list and finds the superblock of the file system* mounted on the device
799  Else if Return 1 if 'cmd' will block on frozen filesystem Then sb = get_super_thawed - get thawed superblock of a device*@bdev: device to get the superblock for* Scans the superblock list and finds the superblock of the file system* mounted on the device. The superblock is returned once it is thawed
801  Else sb = get the superblock of a device
803  bdput(bdev)
804  If Not sb Then Return ERR_PTR( - ENODEV)
807  Return sb
Caller
NameDescribe
kernel_quotactlThis 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.