Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\scatterlist.c Create Date:2022-07-28 06:20:42
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__sg_free_table - Free a previously mapped sg table*@table: The sg table header to use*@max_ents: The maximum number of entries per single scatterlist*@nents_first_chunk: Number of entries int the (preallocated) first* scatterlist chunk, 0 means no such

Proto:void __sg_free_table(struct sg_table *table, unsigned int max_ents, unsigned int nents_first_chunk, sg_free_fn *free_fn)

Type:void

Parameter:

TypeParameterName
struct sg_table *table
unsigned intmax_ents
unsigned intnents_first_chunk
sg_free_fn *free_fn
196  curr_max_ents = If nents_first_chunk Else max_ents
198  If Value for the false possibility is greater at compile time(! the list ) Then Return
201  sgl = the list
202  When original size of list cycle
203  alloc_size = original size of list
212  If alloc_size > curr_max_ents Then
213  next = sg_chain_ptr( & sgl[curr_max_ents - 1])
215  sg_size = alloc_size - 1
216  Else
218  next = NULL
221  original size of list -= sg_size
222  If nents_first_chunk Then nents_first_chunk = 0
224  Else free_fn(sgl, alloc_size)
226  sgl = next
227  curr_max_ents = max_ents
230  the list = NULL
Caller
NameDescribe
sg_free_tablesg_free_table - Free a previously allocated sg table*@table: The mapped sg table header
sg_alloc_tablesg_alloc_table - Allocate and initialize an sg table*@table: The sg table header to use*@nents: Number of entries in sg list*@gfp_mask: GFP allocation mask* Description:* Allocate and initialize an sg table. If @nents@ is larger than
sg_free_table_chainedsg_free_table_chained - Free a previously mapped sg table*@table: The sg table header to use*@nents_first_chunk: size of the first_chunk SGL passed to* sg_alloc_table_chained* Description:* Free an sg table previously allocated and setup with