Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:allocate_partitions

Proto:static struct parsed_partitions *allocate_partitions(struct gendisk *hd)

Type:struct parsed_partitions

Parameter:

TypeParameterName
struct gendisk *hd
120  state = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
121  If Not state Then Return NULL
124  nr = disk_max_parts(hd)
125  parts = vzalloc - allocate virtually contiguous memory with zero fill*@size: allocation size* Allocate enough pages to cover @size from the page level* allocator and map them into contiguous kernel virtual space
126  If Not parts Then
127  kfree(state)
128  Return NULL
131  limit = nr
133  Return state
Caller
NameDescribe
check_partition