Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:bsg_put_device

Proto:static int bsg_put_device(struct bsg_device *bd)

Type:int

Parameter:

TypeParameterName
struct bsg_device *bd
212  q = queue
214  mutex_lock( & bsg_mutex)
216  If Not _dec_and_test - decrement a refcount and test if it is 0*@r: the refcount* Similar to atomic_dec_and_test(), it will WARN on underflow and fail to* decrement when saturated at REFCOUNT_SATURATED Then
217  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
218  Return 0
221  hlist_del( & dev_list)
222  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
224  bsg_dbg(bd, "tearing down\n")
229  kfree(bd)
230  blk_put_queue(q)
231  Return 0
Caller
NameDescribe
bsg_release