Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:bd_acquire

Proto:static struct block_device *bd_acquire(struct inode *inode)

Type:struct block_device

Parameter:

TypeParameterName
struct inode *inode
969  spin_lock( & pseudo-fs)
970  bdev = i_bdev
971  If bdev && Not inode_unhashed( will die ) Then
972  dgrab -- Grab a reference to an already referenced block device*@bdev: Block device to grab a reference to.
973  spin_unlock( & pseudo-fs)
974  Return bdev
976  spin_unlock( & pseudo-fs)
984  If bdev Then Call when you free inode
987  bdev = bdget(i_rdev)
988  If bdev Then
989  spin_lock( & pseudo-fs)
990  If Not i_bdev Then
998  i_bdev = bdev
1001  spin_unlock( & pseudo-fs)
1003  Return bdev
Caller
NameDescribe
blkdev_open
lookup_bdevlookup_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.