|BLKDEV_GET(9)||The Linux VFS||BLKDEV_GET(9)|
blkdev_get - open a block device
int blkdev_get(struct block_device * bdev, fmode_t mode, void * holder);
Open bdev with mode. If mode includes FMODE_EXCL, bdev is open with exclusive access. Specifying FMODE_EXCL with NULL holder is invalid. Exclusive opens may nest for the same holder.
On success, the reference count of bdev is unchanged. On failure, bdev is put.
0 on success, -errno on failure.
|January 2017||Kernel Hackers Manual 4.8.|