函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:This function returns a mask for an event that only contains the flags* that have been specifically requested by the user. Flags that may have* been included within the event mask, but have not been explicitly

函数原型:static unsigned int fanotify_group_event_mask(struct fsnotify_group *group, struct fsnotify_iter_info *iter_info, unsigned int event_mask, const void *data, int data_type)

返回类型:unsigned int

参数:

类型参数名称
struct fsnotify_group *group
struct fsnotify_iter_info *iter_info
unsigned intevent_mask
const void *data
intdata_type
152  marks_mask等于0, marks_ignored_mask等于0
153  user_mask等于Events that may be reported to user
154  path等于data
158  pr_debug("%s: report_mask=%x mask=%x data=%p data_type=%d\n", __func__, report_mask, event_mask, data, data_type)
161  如果非FAN_GROUP_FLAG(group, Report unique file id )则
163  如果data_type不等于FSNOTIFY_EVENT_PATH则返回:0
166  如果非d_is_reg(dentry)且非d_can_lookup(dentry)则返回:0
171  如果非fsnotify_iter_should_report_type(iter_info, type)则继续下一循环
173  mark等于marks[type]
178  如果event_mask按位与This inode cares about things that happen to its children. Always set for* dnotify and inotify. type不等于FSNOTIFY_OBJ_TYPE_INODE或非 Mask this mark is for [mark->lock, group->mark_mutex] 按位与This inode cares about things that happen to its children. Always set for* dnotify and inotify. 的值的值则继续下一循环
183  marks_mask或等于 Mask this mark is for [mark->lock, group->mark_mutex]
184  marks_ignored_mask或等于 Events types to ignore [mark->lock, group->mark_mutex]
187  test_mask等于event_mask按位与marks_mask按位与marks_ignored_mask的反
198  如果FAN_GROUP_FLAG(group, Report unique file id )则
200  如果非test_mask按位与vent occurred against dir 的反的值则返回:0
202  否则
203  user_mask与等于vent occurred against dir 的反
206  如果event_mask按位与vent occurred against dir 且非marks_mask按位与vent occurred against dir 按位与marks_ignored_mask的反的值则返回:0
210  返回:test_mask按位与user_mask
调用者
名称描述
fanotify_handle_event