Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__xas_nomem() - Drop locks and allocate memory if needed.*@xas: XArray operation state.*@gfp: Memory allocation flags.* Internal variant of xas_nomem().* Return: true if memory was needed, and was successfully allocated.

Proto:static bool __xas_nomem(struct xa_state *xas, gfp_t gfp)__must_hold(xas->xa->xa_lock)

Type:bool

Parameter:

TypeParameterName
struct xa_state *xas
gfp_tgfp
325  lock_type = Coding conventions in this file:*@xa is used to refer to the entire xarray
327  If xa_node != We encode errnos in the xas->xa_node. If an error has happened, we need to* drop the lock to fix it, and once we've done so the xa_state is invalid.( - ENOMEM) Then
328  xas_destroy() - Free any resources allocated during the XArray operation.*@xas: XArray operation state.* This function is now internal-only.
329  Return false
331  If private: The rest of the data structure is not to be used directly. & XA_FLAGS_ACCOUNT Then gfp |= __GFP_ACCOUNT
333  If gfpflags_allow_blocking(gfp) Then
334  xas_unlock_type(xas, lock_type)
335  xa_alloc = kmem_cache_alloc(Move the radix tree node cache here , gfp)
336  xas_lock_type(xas, lock_type)
337  Else
338  xa_alloc = kmem_cache_alloc(Move the radix tree node cache here , gfp)
340  If Not xa_alloc Then Return false
342  XA_NODE_BUG_ON(xa_alloc, !list_empty - tests whether a list is empty*@head: the list to test.)
343  xa_node = XAS_RESTART
344  Return true
Caller
NameDescribe
__xa_store__xa_store() - Store this entry in the XArray
__xa_cmpxchg__xa_cmpxchg() - Store this entry in the XArray
__xa_insert__xa_insert() - Store this entry in the XArray if no entry is present.*@xa: XArray.*@index: Index into array.*@entry: New entry.*@gfp: Memory allocation flags.* Inserting a NULL entry will store a reserved entry (like xa_reserve())* if no entry is present
__xa_alloc