函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\notify\fanotify\fanotify.c Create Date:2022-07-29 10:49:47
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:should_merge

函数原型:static bool should_merge(struct fsnotify_event *old_fsn, struct fsnotify_event *new_fsn)

返回类型:bool

参数:

类型参数名称
struct fsnotify_event *old_fsn
struct fsnotify_event *new_fsn
25  pr_debug("%s: old=%p new=%p\n", __func__, old_fsn, new_fsn)
26  old等于FANOTIFY_E(old_fsn)
27  new等于FANOTIFY_E(new_fsn)
29  如果 either the inode the event happened to or its parent 不等于 either the inode the event happened to or its parent pid不等于pidThose fields are outside fanotify_fid to pack fanotify_event nicely* on 64bit arch and to use fh_type as an indication of whether path* or fid are used in the union:* FILEID_ROOT (0) for path, > 0 for fid, FILEID_INVALID for neither.不等于Those fields are outside fanotify_fid to pack fanotify_event nicely* on 64bit arch and to use fh_type as an indication of whether path* or fid are used in the union:* FILEID_ROOT (0) for path, > 0 for fid, FILEID_INVALID for neither.fh_len不等于fh_len则返回:false
33  如果fanotify_event_has_path(old)则
34  返回:mnt恒等于mntdentry恒等于dentry
36  否则如果fanotify_event_has_fid(old)则
45  返回:mask按位与vent occurred against dir 的值恒等于mask按位与vent occurred against dir 的值且fanotify_fid_equal( & With FAN_REPORT_FID, we do not hold any reference on the* victim object. Instead we store its NFS file handle and its* filesystem's fsid as a unique identifier., & With FAN_REPORT_FID, we do not hold any reference on the* victim object. Instead we store its NFS file handle and its* filesystem's fsid as a unique identifier., fh_len)
50  返回:false
调用者
名称描述
fanotify_mergeand the list better be locked by something too!