Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\zbud.c Create Date:2022-07-28 16:25:51
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:zbud_free() - frees the allocation associated with the given handle*@pool: pool in which the allocation resided*@handle: handle associated with the allocation returned by zbud_alloc()* In the case that the zbud page in which the allocation resides is

Proto:void zbud_free(struct zbud_pool *pool, unsigned long handle)

Type:void

Parameter:

TypeParameterName
struct zbud_pool *pool
unsigned longhandle
435  spin_lock( & lock)
436  zhdr = Returns the zbud page where a given handle is stored
439  If handle - ZHDR_SIZE_ALIGNED & ~PAGE_MASK Then last_chunks = 0
441  Else first_chunks = 0
444  If under_reclaim Then
446  spin_unlock( & lock)
447  Return
451  deletes entry from list
453  If first_chunks == 0 && last_chunks == 0 Then
455  deletes entry from list
456  Resets the struct page fields and frees the page
457  pages_nr--
458  Else
460  freechunks = Returns the number of free chunks in a zbud page
461  list_add - add a new entry*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head.* This is good for implementing stacks.
464  spin_unlock( & lock)
Caller
NameDescribe
zbud_zpool_free