Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:check_create_range_4

Proto:static noinline void check_create_range_4(struct xarray *xa, unsigned long index, unsigned order)

Type:void

Parameter:

TypeParameterName
struct xarray *xa
unsigned longindex
unsignedorder
1358  XA_STATE_ORDER() - Declare an XArray operation state.*@name: Name of this operation state (usually xas).*@array: Array to operate on.*@index: Initial index of interest.*@order: Order of entry.* Declare and initialise an xa_state on the stack(xas, xa, index, order)
1359  base = xa_index
1360  i = 0
1362  xa_store_index(xa, index, GFP_KERNEL)
1363  Do
1364  xas_lock( & xas)
1365  xas_create_range() - Ensure that stores to this range will succeed*@xas: XArray operation state.* Creates all of the slots in the range covered by @xas. Sets @xas to* create single-index entries and positions it at the beginning of the* range
1366  If xas_error() - Return an errno stored in the xa_state.*@xas: XArray operation state.* Return: 0 if no error has been noted. A negative errno if one has. Then Go to unlock
1368  When i < 1UL << order cycle
1370  If xa_index == index Then XA_BUG_ON(xa, old != xa_mk_index(base + i))
1372  Else XA_BUG_ON(xa, old != NULL)
1376  unlock :
1377  xas_unlock( & xas)
1378  When xas_nomem() - Allocate memory if needed.*@xas: XArray operation state.*@gfp: Memory allocation flags.* If we need to add new nodes to the XArray, we try to allocate memory* with GFP_NOWAIT while holding the lock, which will usually succeed. cycle
1380  XA_BUG_ON(xa, xas_error() - Return an errno stored in the xa_state.*@xas: XArray operation state.* Return: 0 if no error has been noted. A negative errno if one has.)
1382  When i < base + (1UL << order) cycle xa_erase_index(xa, i)
1384  XA_BUG_ON(xa, !xa_empty() - Determine if an array has any present entries.*@xa: XArray.* Context: Any context.* Return: %true if the array contains only NULL pointers.)
Caller
NameDescribe
check_create_range