函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\swapfile.c Create Date:2022-07-27 16:47:46
Last Modify:2020-03-17 22:19:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:_swap_info_get

函数原型:static struct swap_info_struct *_swap_info_get(swp_entry_t entry)

返回类型:struct swap_info_struct

参数:

类型参数名称
swp_entry_tentry
1137  p等于__swap_info_get(entry)
1138  如果非p则转到:out
1140  如果非vmalloc'ed array of usage counts [Extract the `offset' field from a swp_entry_t. The swp_entry_t is in* arch-independent format]则转到:bad_free
1142  返回:p
1144  bad_free :
1145  打印错误信息("swap_info_get: %s%08lx\n", Unused_offset, val)
1146  转到:out
1147  out :
1148  返回:NULL
调用者
名称描述
swap_info_get
swap_info_get_cont
swap_freeCaller has made sure that the swap device corresponding to entry* is still around or has not been recycled.
put_swap_pageCalled after dropping swapcache to decrease refcnt to swap entries.
page_swapcountHow many references to page are currently swapped out?* This does not give an exact answer when swap count is continued,* but does include the high COUNT_CONTINUED flag to allow for that.
swp_swapcountHow many references to @entry are currently swapped out?* This considers COUNT_CONTINUED so it returns exact answer.
page_swapped
page_trans_huge_map_swapcount
free_swap_and_cacheFree the swap entry like above, but also try to* free the page cache entry if it is the last user.