Lines Matching refs:event

164 static inline void fanotify_init_event(struct fanotify_event *event,  in fanotify_init_event()  argument
167 fsnotify_init_event(&event->fse); in fanotify_init_event()
168 INIT_HLIST_NODE(&event->merge_list); in fanotify_init_event()
169 event->hash = hash; in fanotify_init_event()
170 event->mask = mask; in fanotify_init_event()
171 event->pid = NULL; in fanotify_init_event()
189 FANOTIFY_FE(struct fanotify_event *event) in FANOTIFY_FE() argument
191 return container_of(event, struct fanotify_fid_event, fae); in FANOTIFY_FE()
201 FANOTIFY_NE(struct fanotify_event *event) in FANOTIFY_NE() argument
203 return container_of(event, struct fanotify_name_event, fae); in FANOTIFY_NE()
217 FANOTIFY_EE(struct fanotify_event *event) in FANOTIFY_EE() argument
219 return container_of(event, struct fanotify_error_event, fae); in FANOTIFY_EE()
222 static inline __kernel_fsid_t *fanotify_event_fsid(struct fanotify_event *event) in fanotify_event_fsid() argument
224 if (event->type == FANOTIFY_EVENT_TYPE_FID) in fanotify_event_fsid()
225 return &FANOTIFY_FE(event)->fsid; in fanotify_event_fsid()
226 else if (event->type == FANOTIFY_EVENT_TYPE_FID_NAME) in fanotify_event_fsid()
227 return &FANOTIFY_NE(event)->fsid; in fanotify_event_fsid()
228 else if (event->type == FANOTIFY_EVENT_TYPE_FS_ERROR) in fanotify_event_fsid()
229 return &FANOTIFY_EE(event)->fsid; in fanotify_event_fsid()
235 struct fanotify_event *event) in fanotify_event_object_fh() argument
237 if (event->type == FANOTIFY_EVENT_TYPE_FID) in fanotify_event_object_fh()
238 return &FANOTIFY_FE(event)->object_fh; in fanotify_event_object_fh()
239 else if (event->type == FANOTIFY_EVENT_TYPE_FID_NAME) in fanotify_event_object_fh()
240 return fanotify_info_file_fh(&FANOTIFY_NE(event)->info); in fanotify_event_object_fh()
241 else if (event->type == FANOTIFY_EVENT_TYPE_FS_ERROR) in fanotify_event_object_fh()
242 return &FANOTIFY_EE(event)->object_fh; in fanotify_event_object_fh()
248 struct fanotify_event *event) in fanotify_event_info() argument
250 if (event->type == FANOTIFY_EVENT_TYPE_FID_NAME) in fanotify_event_info()
251 return &FANOTIFY_NE(event)->info; in fanotify_event_info()
256 static inline int fanotify_event_object_fh_len(struct fanotify_event *event) in fanotify_event_object_fh_len() argument
258 struct fanotify_info *info = fanotify_event_info(event); in fanotify_event_object_fh_len()
259 struct fanotify_fh *fh = fanotify_event_object_fh(event); in fanotify_event_object_fh_len()
267 static inline int fanotify_event_dir_fh_len(struct fanotify_event *event) in fanotify_event_dir_fh_len() argument
269 struct fanotify_info *info = fanotify_event_info(event); in fanotify_event_dir_fh_len()
274 static inline bool fanotify_event_has_object_fh(struct fanotify_event *event) in fanotify_event_has_object_fh() argument
277 if (event->type == FANOTIFY_EVENT_TYPE_FS_ERROR) in fanotify_event_has_object_fh()
279 return fanotify_event_object_fh_len(event) > 0; in fanotify_event_has_object_fh()
282 static inline bool fanotify_event_has_dir_fh(struct fanotify_event *event) in fanotify_event_has_dir_fh() argument
284 return fanotify_event_dir_fh_len(event) > 0; in fanotify_event_has_dir_fh()
293 FANOTIFY_PE(struct fanotify_event *event) in FANOTIFY_PE() argument
295 return container_of(event, struct fanotify_path_event, fae); in FANOTIFY_PE()
314 FANOTIFY_PERM(struct fanotify_event *event) in FANOTIFY_PERM() argument
316 return container_of(event, struct fanotify_perm_event, fae); in FANOTIFY_PERM()
335 static inline bool fanotify_event_has_path(struct fanotify_event *event) in fanotify_event_has_path() argument
337 return event->type == FANOTIFY_EVENT_TYPE_PATH || in fanotify_event_has_path()
338 event->type == FANOTIFY_EVENT_TYPE_PATH_PERM; in fanotify_event_has_path()
341 static inline struct path *fanotify_event_path(struct fanotify_event *event) in fanotify_event_path() argument
343 if (event->type == FANOTIFY_EVENT_TYPE_PATH) in fanotify_event_path()
344 return &FANOTIFY_PE(event)->path; in fanotify_event_path()
345 else if (event->type == FANOTIFY_EVENT_TYPE_PATH_PERM) in fanotify_event_path()
346 return &FANOTIFY_PERM(event)->path; in fanotify_event_path()
369 struct fanotify_event *event) in fanotify_event_hash_bucket() argument
371 return event->hash & FANOTIFY_HTABLE_MASK; in fanotify_event_hash_bucket()