Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\notify\inotify\inotify_fsnotify.c Create Date:2022-07-28 20:17:23
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:inotify_handle_event

Proto: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)

Type:int

Parameter:

TypeParameterName
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  If WARN_ON(fsnotify_iter_vfsmount_mark(iter_info)) Then Return 0
75  If Mask this mark is for [mark->lock, group->mark_mutex] & do not send events if object is unlinked && data_type == FSNOTIFY_EVENT_PATH Then
77  path = data
79  If d_unlinked(dentry) Then Return 0
82  If file_name Then
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 = Allocation memory
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  If Value for the false possibility is greater at compile time(!event) Then
107  fsnotify_queue_overflow(group)
108  Return -ENOMEM
117  If mask & (Self was moved | Self was deleted ) Then 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  If len Then strcpy(name, name)
129  ret = Add an event to the group notification queue
130  If ret Then
132  fsnotify_destroy_event(group, fsn_event)
135  If Mask this mark is for [mark->lock, group->mark_mutex] & ly send event once Then fsnotify_destroy_mark(inode_mark, group)
138  Return 0
Caller
NameDescribe
inotify_ignored_and_remove_idrSend IN_IGNORED for this wd, remove this wd from the idr.