函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\aio.c Create Date:2022-07-29 10:53:21
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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.

函数原型:static void free_ioctx_users(struct percpu_ref *ref)

返回类型:void

参数:

类型参数名称
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  当非链表为空循环
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  删除链表项并重新初始化
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计数引用减