Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\genhd.h Create Date:2022-07-28 05:44:37
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:hd_ref_init

Proto:static inline int hd_ref_init(struct hd_struct *part)

Type:int

Parameter:

TypeParameterName
struct hd_struct *part
694  If percpu_ref_init - initialize a percpu refcount*@ref: percpu_ref to initialize*@release: function which will be called when refcount hits 0*@flags: PERCPU_REF_INIT_* flags*@gfp: allocation mask to use* Initializes @ref Then Return -ENOMEM
697  Return 0
Caller
NameDescribe
__alloc_disk_node
add_partitionMust be called either with bd_mutex held, before a disk can be opened or* after all disk users are gone.