函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:In the case that a entry with the same offset is found, a pointer to* the existing entry is stored in dupentry and the function returns -EEXIST

函数原型:static int zswap_rb_insert(struct rb_root *root, struct zswap_entry *entry, struct zswap_entry **dupentry)

返回类型:int

参数:

类型参数名称
struct rb_root *root
struct zswap_entry *entry
struct zswap_entry **dupentry
291  struct rb_node * * link = & rb_node, * parent = NULL
294 link循环
295  parent等于link
296  myentry等于rb_entry(parent, structzswap_entry, rbnode)
297  如果 the swap offset for the entry. Index into the red-black tree.大于 the swap offset for the entry. Index into the red-black tree.link等于rb_left
299  否则如果 the swap offset for the entry. Index into the red-black tree.小于 the swap offset for the entry. Index into the red-black tree.link等于rb_right
301  否则
302  dupentry等于myentry
303  返回:负EEXIST
306  rb_link_node( & links the entry into red-black tree for the appropriate swap type, parent, link)
307  rb_insert_color( & links the entry into red-black tree for the appropriate swap type, root)
308  返回:0
调用者
名称描述
zswap_frontswap_storeattempts to compress and store an single page