函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:struct block_device *lookup_bdev(const char *pathname)

返回类型:struct block_device

参数:

类型参数名称
const char *pathname
2190  如果非pathname或非pathname则返回:错误号
2193  error等于kern_path(pathname, llow links at the end , & path)
2194  如果error则返回:错误号
2197  inode等于d_backing_inode - Get upper or lower inode we should be using*@upper: The upper layer* This is the helper that should be used to get at the inode that will be used* if this dentry were to be opened as a file. The inode may be on the upper
2198  error等于负ENOTBLK
2199  如果非S_ISBLK(i_mode)则转到:fail
2201  error等于负EACCES
2202  如果非may_open_dev( & path)则转到:fail
2204  error等于负ENOMEM
2205  bdev等于bd_acquire(inode)
2206  如果非bdev则转到:fail
2208  out :
2209  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.
2210  返回:bdev
2211  fail :
2212  bdev等于错误号
2213  转到:out
调用者
名称描述
blkdev_get_by_pathlkdev_get_by_path - open a block device by name*@path: path to the block device to open*@mode: FMODE_* mask*@holder: exclusive holder identifier* Open the blockdevice described by the device file at @path. @mode* and @holder are identical to blkdev_get().
quotactl_blocklook up a superblock on which quota ops will be performed* - use the name of a block device to find the superblock thereon