Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:bsg_add_device

Proto:static struct bsg_device *bsg_add_device(struct inode *inode, struct request_queue *rq, struct file *file)

Type:struct bsg_device

Parameter:

TypeParameterName
struct inode *inode
struct request_queue *rq
struct file *file
241  lockdep_assert_held( & bsg_mutex)
243  If Not blk_get_queue(rq) Then Return ERR_PTR( - ENXIO)
246  bd = bsg_alloc_device()
247  If Not bd Then
248  blk_put_queue(rq)
249  Return ERR_PTR( - ENOMEM)
252  queue = rq
254  _set - set a refcount's value*@r: the refcount*@n: value to which the refcount will be set
255  hlist_add_head( & dev_list, bsg_dev_idx_hash(iminor(inode)))
257  strncpy(name, dev_name(class_dev), size of name - 1)
258  bsg_dbg(bd, "bound to <%s>, max queue %d\n", format_dev_t(buf, i_rdev), max_queue)
261  Return bd
Caller
NameDescribe
bsg_get_device