函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:It's possible scan_swap_map() uses a free cluster in the middle of free* cluster list. Avoiding such abuse to avoid list corruption.

函数原型:static bool scan_swap_map_ssd_cluster_conflict(struct swap_info_struct *si, unsigned long offset)

返回类型:bool

参数:

类型参数名称
struct swap_info_struct *si
unsigned longoffset
582  offset除等于SWAPFILE_CLUSTER
583  conflict等于非cluster_list_empty( & clusters list )且offset不等于cluster_list_first( & clusters list )且cluster_is_free( & cluster info. Only for SSD [offset])
587  如果非conflict则返回:false
590  percpu_cluster等于this_cpu_ptr(per cpu's swap location )
591  cluster_set_null( & Current cluster index )
592  返回:true
调用者
名称描述
scan_swap_map_slots