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:bdev_get_gendisk

Proto:static struct gendisk *bdev_get_gendisk(struct block_device *bdev, int *partno)

Type:struct gendisk

Parameter:

TypeParameterName
struct block_device *bdev
int *partno
1100  disk = get_gendisk( not a kdev_t - it's a search key , partno)
1102  If Not disk Then Return NULL
1112  If inode_unhashed( will die ) Then
1113  put_disk_and_module(disk)
1114  Return NULL
1116  Return disk
Caller
NameDescribe
bd_start_claimingd_start_claiming - start claiming a block device*@bdev: block device of interest*@holder: holder trying to claim @bdev*@bdev is about to be opened exclusively
__blkdev_getd_mutex locking:* mutex_lock(part->bd_mutex)* mutex_lock_nested(whole->bd_mutex, 1)