函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:inotify_handle_event

函数原型:int inotify_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
64  inode_mark等于fsnotify_iter_inode_mark(iter_info)
69  len等于0
70  alloc_len等于sizeof(structinotify_event_info)
72  如果WARN_ON(fsnotify_iter_vfsmount_mark(iter_info))则返回:0
75  如果 Mask this mark is for [mark->lock, group->mark_mutex] 按位与do not send events if object is unlinked data_type恒等于FSNOTIFY_EVENT_PATH
77  path等于data
79  如果d_unlinked(dentry)则返回:0
82  如果file_name
83  len等于len
84  alloc_len加等于len加1
87  pr_debug("%s: group=%p inode=%p mask=%x\n", __func__, group, inode, mask)
90  i_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, structinotify_inode_mark, fsn_mark)
98  memalloc_use_memcg - Starts the remote memcg charging scope.*@memcg: memcg to charge.* This function marks the beginning of the remote memcg charging scope. All the* __GFP_ACCOUNT allocations till the end of the scope will be charged to the* given memcg.
99  event等于开辟内存
100  memalloc_unuse_memcg - Ends the remote memcg charging scope.* This function marks the end of the remote memcg charging scope started by* memalloc_use_memcg().
102  如果此条件成立可能性小(为编译器优化)(!event)则
107  fsnotify_queue_overflow(group)
108  返回:负ENOMEM
117  如果mask按位与Self was moved 按位或Self was deleted 的值则mask与等于vent occurred against dir 的反
120  fsn_event等于fse
121  fsnotify_init_event(fsn_event, inode)
122  mask等于mask
123  wd等于wd
124  sync_cookie等于cookie
125  name_len等于len
126  如果lenstrcpy(name, name)
129  ret等于Add an event to the group notification queue
130  如果ret
132  fsnotify_destroy_event(group, fsn_event)
135  如果 Mask this mark is for [mark->lock, group->mark_mutex] 按位与ly send event once fsnotify_destroy_mark(inode_mark, group)
138  返回:0
调用者
名称描述
inotify_ignored_and_remove_idrSend IN_IGNORED for this wd, remove this wd from the idr.