Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:When this function runs, the kioctx has been removed from the "hash table"* and ctx->users has dropped to 0, so we know no more kiocbs can be submitted -* now it's safe to cancel any that need to be.

Proto:static void free_ioctx_users(struct percpu_ref *ref)

Type:void

Parameter:

TypeParameterName
struct percpu_ref *ref
615  ctx = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(ref, structkioctx, users)
618  spin_lock_irq( & ctx_lock)
620  When Not list_empty - tests whether a list is empty*@head: the list to test. cycle
621  req = list_first_entry - get the first element from a list*@ptr: the list head to take the element from.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.* Note, that list is expected to be not empty.( & used for cancellation , structaio_kiocb, ki_list)
623  ki_cancel( & rw)
624  list_del_init - deletes entry from list and reinitialize it.*@entry: the element to delete from the list.
627  spin_unlock_irq( & ctx_lock)
629  percpu_ref_kill - drop the initial ref*@ref: percpu_ref to kill* Must be used to drop the initial ref on a percpu refcount; must be called* precisely once before shutdown.* Switches @ref into atomic mode before gathering up the percpu counters
630  percpu_ref_put - decrement a percpu refcount*@ref: percpu_ref to put* Decrement the refcount, and if 0, call the release function (which was passed* to percpu_ref_init())* This function is safe to call as long as @ref is between init and exit.