函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__swap_entry_free

函数原型:static unsigned char __swap_entry_free(struct swap_info_struct *p, swp_entry_t entry, unsigned char usage)

返回类型:unsigned char

参数:

类型参数名称
struct swap_info_struct *p
swp_entry_tentry
unsigned charusage
1281  offset等于Extract the `offset' field from a swp_entry_t. The swp_entry_t is in* arch-independent format
1283  ci等于Determine the locking method in use for this device. Return* swap_cluster_info if SSD-style cluster-based locking is in place.
1284  usage等于__swap_entry_free_locked(p, offset, usage)
1285  unlock_cluster_or_swap_info(p, ci)
1286  如果非usagefree_swap_slot(entry)
1289  返回:usage
调用者
名称描述
swap_freeCaller has made sure that the swap device corresponding to entry* is still around or has not been recycled.
free_swap_and_cacheFree the swap entry like above, but also try to* free the page cache entry if it is the last user.