函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:send_to_group

函数原型:static int send_to_group(struct inode *to_tell, __u32 mask, const void *data, int data_is, unsigned int cookie, const struct qstr *file_name, struct fsnotify_iter_info *iter_info)

返回类型:int

参数:

类型参数名称
struct inode *to_tell
__u32mask
const void *data
intdata_is
unsigned intcookie
const struct qstr *file_name
struct fsnotify_iter_info *iter_info
192  struct fsnotify_group * group = NULL
193  test_mask等于mask按位与Events that can be reported to backends
194  marks_mask等于0
195  marks_ignored_mask等于0
199  如果WARN_ON(!report_mask)则返回:0
203  如果mask按位与File was modified
205  如果非fsnotify_iter_should_report_type(iter_info, type)则继续下一循环
207  mark等于marks[type]
208  如果mark且非 flags [mark->lock] 按位与FSNOTIFY_MARK_FLAG_IGNORED_SURV_MODIFY的值则 Events types to ignore [mark->lock, group->mark_mutex] 等于0
215  如果非fsnotify_iter_should_report_type(iter_info, type)则继续下一循环
217  mark等于marks[type]
219  如果mark
226  pr_debug("%s: group=%p to_tell=%p mask=%x marks_mask=%x marks_ignored_mask=%x data=%p data_is=%d cookie=%d\n", __func__, group, to_tell, mask, marks_mask, marks_ignored_mask, data, data_is, cookie)
231  如果非test_mask按位与marks_mask按位与marks_ignored_mask的反的值则返回:0
234  返回:handle_event(group, to_tell, mask, data, data_is, file_name, cookie, iter_info)
调用者
名称描述
fsnotifyThis is the main call to fsnotify. The VFS calls into hook specific functions* in linux/fsnotify.h. Those functions then in turn call here. Here will call* out to all of the registered fsnotify_group. Those groups can then use the