函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\genhd.c Create Date:2022-07-27 18:52:51
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__disk_get_part

函数原型:struct hd_struct *__disk_get_part(struct gendisk *disk, int partno)

返回类型:struct hd_struct

参数:

类型参数名称
struct gendisk *disk
intpartno
113  ptbl等于cu_dereference() - fetch RCU-protected pointer for dereferencing*@p: The pointer to read, prior to dereferencing* This is a simple wrapper around rcu_dereference_check().( Array of pointers to partitions indexed by partno. * Protected with matching bdev lock but stat and other * non-critical accesses use RCU. Always access through * helpers.)
115  如果此条件成立可能性小(为编译器优化)(partno < 0 || partno >= len)则返回:NULL
117  返回:cu_dereference() - fetch RCU-protected pointer for dereferencing*@p: The pointer to read, prior to dereferencing* This is a simple wrapper around rcu_dereference_check().(part[partno])
调用者
名称描述
disk_get_partdisk_get_part - get partition*@disk: disk to look partition from*@partno: partition number* Look for partition @partno from @disk. If found, increment* reference count and return it.* CONTEXT:* Don't care.* RETURNS: