函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:da_free() - Release an allocated ID.*@ida: IDA handle.*@id: Previously allocated ID.* Context: Any context.

函数原型:void ida_free(struct ida *ida, unsigned int id)

返回类型:void

参数:

类型参数名称
struct ida *ida
unsigned intid
486  XA_STATE() - Declare an XArray operation state.*@name: Name of this operation state (usually xas).*@array: Array to operate on.*@index: Initial index of interest.* Declare and initialise an xa_state on the stack.(xas, & xa, id / IDA_BITMAP_BITS)
487  bit等于id取模IDA_BITMAP_BITS
491  BUG_ON((int)id < 0)
493  xas_lock_irqsave( & xas, flags)
494  bitmap等于xas_load() - Load an entry from the XArray (advanced).*@xas: XArray operation state.* Usually walks the @xas to the appropriate state to load the entry* stored at xa_index. However, it will do nothing and return %NULL if*@xas is in an error state
496  如果xa_is_value() - Determine if an entry is a value.*@entry: XArray entry.* Context: Any context.* Return: True if the entry is a value, false if it is a pointer.
497  v等于xa_to_value() - Get value stored in an XArray entry.*@entry: XArray entry.* Context: Any context.* Return: The value stored in the XArray entry.
498  如果bit大于等于The bottom two bits of the entry determine how the XArray interprets* the contents:* 00: Pointer entry* 10: Internal entry* x1: Value entry or tagged pointer* Attempting to store internal entries in the XArray is a bug.则转到:err
500  如果非v按位与1UL左移bit位的值则转到:err
502  v与等于1UL左移bit位的值的反
503  如果非v则转到:delete
505  xas_store() - Store this entry in the XArray
506  否则
507  如果非st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from则转到:err
509  __clear_bit - Clears a bit in memory*@nr: the bit to clear*@addr: the address to start counting from* Unlike clear_bit(), this function is non-atomic. If it is called on the same* region of memory concurrently, the effect may be that only one operation
510  xas_set_mark() - Sets the mark on this entry and its parents.*@xas: XArray operation state.*@mark: Mark number.* Sets the specified mark on this entry, and walks up the tree setting it* on all the ancestor entries
512  释放内存
513  delete :
517  xas_unlock_irqrestore( & xas, flags)
518  返回
519  err :
520  xas_unlock_irqrestore( & xas, flags)
521  WARN(1, "ida_free called for id=%d which is not allocated.\n", id)
调用者
名称描述
ida_check_allocStraightforward checks that allocating and freeing IDs work.
ida_check_leafCheck what happens when we fill a leaf and then delete it. This may* discover mishandling of IDR_FREE.
ida_check_convCheck handling of conversions between exceptional entries and full bitmaps.
memregion_free
objagg_obj_root_id_free
mnt_free_id
mnt_release_group_idRelease a peer group ID
devpts_kill_index
free_anon_bdev