函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Mains fsnotify call where events are delivered to dnotify.* Find the dnotify mark on the relevant inode, run the list of dnotify structs* on that mark and determine which of them has expressed interest in receiving* events of this type

函数原型:static int dnotify_handle_event(struct fsnotify_group *group, struct inode *inode, unsigned int mask, const void *data, int data_type, const struct qstr *file_name, unsigned int cookie, struct fsnotify_iter_info *iter_info)

返回类型:int

参数:

类型参数名称
struct fsnotify_group *group
struct inode *inode
unsigned intmask
const void *data
intdata_type
const struct qstr *file_name
unsigned intcookie
struct fsnotify_iter_info *iter_info
79  inode_mark等于fsnotify_iter_inode_mark(iter_info)
84  test_mask等于mask按位与This inode cares about things that happen to its children. Always set for* dnotify and inotify. 的反
87  如果非S_ISDIR(i_mode)则返回:0
90  如果WARN_ON(fsnotify_iter_vfsmount_mark(iter_info))则返回:0
93  dn_mark等于container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(inode_mark, structdnotify_mark, fsn_mark)
95  加自旋锁
96  prev等于dn
97  当((dn = * prev) != NULL)循环
98  如果dn_mask按位与test_mask的值恒等于0则
99  prev等于dn_next
100  继续下一循环
102  fown等于f_owner
103  send_sigio(fown, dn_fd, put message available )
104  如果dn_mask按位与dnotify multishot prev等于dn_next
106  否则
107  prev等于dn_next
113  自旋锁解锁
115  返回:0