函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\relay.c Create Date:2022-07-27 12:51:35
Last Modify:2020-03-17 19:20:22 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:lay_destroy_buf - destroy an rchan_buf struct and associated buffer*@buf: the buffer struct

函数原型:static void relay_destroy_buf(struct rchan_buf *buf)

返回类型:void

参数:

类型参数名称
struct rchan_buf *buf
209  chan等于associated channel
212  如果此条件成立可能性大(为编译器优化)(start of channel buffer )则
213  vunmap(start of channel buffer )
214 i小于umber of current buffer pages 循环__free_page(array of current buffer pages [i])
216  an array of pointers of struct page
218  * per_cpu_ptr( per-cpu channel buffers , his buf's cpu ) = NULL
219  kfree(padding counts per sub-buffer )
220  kfree(buf)
221  kref_put - decrement refcount for object.*@kref: object.*@release: pointer to the function that will clean up the object when the* last reference to the object is released.* This pointer is required, and it is not acceptable to pass kfree
调用者
名称描述
relay_remove_buflay_remove_buf - remove a channel buffer*@kref: target kernel reference that contains the relay buffer* Removes the file from the filesystem, which also frees the* rchan_buf_struct and the channel buffer. Should only be called from* kref_put().
relay_open_buflay_open_buf - create a new relay channel buffer* used by relay_open() and CPU hotplug.