Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:lkdev_get_by_dev - open a block device by device number*@dev: device number of block device to open*@mode: FMODE_* mask*@holder: exclusive holder identifier* Open the blockdevice described by device number @dev. @mode and

Proto:struct block_device *blkdev_get_by_dev(dev_t dev, fmode_t mode, void *holder)

Type:struct block_device

Parameter:

TypeParameterName
dev_tdev
fmode_tmode
void *holder
1835  bdev = bdget(dev)
1836  If Not bdev Then Return ERR_PTR( - ENOMEM)
1839  err = lkdev_get - open a block device*@bdev: block_device to open*@mode: FMODE_* mask*@holder: exclusive holder identifier* Open @bdev with @mode. If @mode includes %FMODE_EXCL, @bdev is* open with exclusive access. Specifying %FMODE_EXCL with %NULL
1840  If err Then Return ERR_PTR(err)
1843  Return bdev