Lines Matching refs:event

266 static inline void fanotify_init_event(struct fanotify_event *event,  in fanotify_init_event()  argument
269 fsnotify_init_event(&event->fse); in fanotify_init_event()
270 INIT_HLIST_NODE(&event->merge_list); in fanotify_init_event()
271 event->hash = hash; in fanotify_init_event()
272 event->mask = mask; in fanotify_init_event()
273 event->pid = NULL; in fanotify_init_event()
291 FANOTIFY_FE(struct fanotify_event *event) in FANOTIFY_FE() argument
293 return container_of(event, struct fanotify_fid_event, fae); in FANOTIFY_FE()
303 FANOTIFY_NE(struct fanotify_event *event) in FANOTIFY_NE() argument
305 return container_of(event, struct fanotify_name_event, fae); in FANOTIFY_NE()
319 FANOTIFY_EE(struct fanotify_event *event) in FANOTIFY_EE() argument
321 return container_of(event, struct fanotify_error_event, fae); in FANOTIFY_EE()
324 static inline __kernel_fsid_t *fanotify_event_fsid(struct fanotify_event *event) in fanotify_event_fsid() argument
326 if (event->type == FANOTIFY_EVENT_TYPE_FID) in fanotify_event_fsid()
327 return &FANOTIFY_FE(event)->fsid; in fanotify_event_fsid()
328 else if (event->type == FANOTIFY_EVENT_TYPE_FID_NAME) in fanotify_event_fsid()
329 return &FANOTIFY_NE(event)->fsid; in fanotify_event_fsid()
330 else if (event->type == FANOTIFY_EVENT_TYPE_FS_ERROR) in fanotify_event_fsid()
331 return &FANOTIFY_EE(event)->fsid; in fanotify_event_fsid()
337 struct fanotify_event *event) in fanotify_event_object_fh() argument
339 if (event->type == FANOTIFY_EVENT_TYPE_FID) in fanotify_event_object_fh()
340 return &FANOTIFY_FE(event)->object_fh; in fanotify_event_object_fh()
341 else if (event->type == FANOTIFY_EVENT_TYPE_FID_NAME) in fanotify_event_object_fh()
342 return fanotify_info_file_fh(&FANOTIFY_NE(event)->info); in fanotify_event_object_fh()
343 else if (event->type == FANOTIFY_EVENT_TYPE_FS_ERROR) in fanotify_event_object_fh()
344 return &FANOTIFY_EE(event)->object_fh; in fanotify_event_object_fh()
350 struct fanotify_event *event) in fanotify_event_info() argument
352 if (event->type == FANOTIFY_EVENT_TYPE_FID_NAME) in fanotify_event_info()
353 return &FANOTIFY_NE(event)->info; in fanotify_event_info()
358 static inline int fanotify_event_object_fh_len(struct fanotify_event *event) in fanotify_event_object_fh_len() argument
360 struct fanotify_info *info = fanotify_event_info(event); in fanotify_event_object_fh_len()
361 struct fanotify_fh *fh = fanotify_event_object_fh(event); in fanotify_event_object_fh_len()
369 static inline int fanotify_event_dir_fh_len(struct fanotify_event *event) in fanotify_event_dir_fh_len() argument
371 struct fanotify_info *info = fanotify_event_info(event); in fanotify_event_dir_fh_len()
376 static inline int fanotify_event_dir2_fh_len(struct fanotify_event *event) in fanotify_event_dir2_fh_len() argument
378 struct fanotify_info *info = fanotify_event_info(event); in fanotify_event_dir2_fh_len()
383 static inline bool fanotify_event_has_object_fh(struct fanotify_event *event) in fanotify_event_has_object_fh() argument
386 if (event->type == FANOTIFY_EVENT_TYPE_FS_ERROR) in fanotify_event_has_object_fh()
388 return fanotify_event_object_fh_len(event) > 0; in fanotify_event_has_object_fh()
391 static inline bool fanotify_event_has_dir_fh(struct fanotify_event *event) in fanotify_event_has_dir_fh() argument
393 return fanotify_event_dir_fh_len(event) > 0; in fanotify_event_has_dir_fh()
396 static inline bool fanotify_event_has_dir2_fh(struct fanotify_event *event) in fanotify_event_has_dir2_fh() argument
398 return fanotify_event_dir2_fh_len(event) > 0; in fanotify_event_has_dir2_fh()
401 static inline bool fanotify_event_has_any_dir_fh(struct fanotify_event *event) in fanotify_event_has_any_dir_fh() argument
403 return fanotify_event_has_dir_fh(event) || in fanotify_event_has_any_dir_fh()
404 fanotify_event_has_dir2_fh(event); in fanotify_event_has_any_dir_fh()
413 FANOTIFY_PE(struct fanotify_event *event) in FANOTIFY_PE() argument
415 return container_of(event, struct fanotify_path_event, fae); in FANOTIFY_PE()
438 FANOTIFY_PERM(struct fanotify_event *event) in FANOTIFY_PERM() argument
440 return container_of(event, struct fanotify_perm_event, fae); in FANOTIFY_PERM()
459 static inline const struct path *fanotify_event_path(struct fanotify_event *event) in fanotify_event_path() argument
461 if (event->type == FANOTIFY_EVENT_TYPE_PATH) in fanotify_event_path()
462 return &FANOTIFY_PE(event)->path; in fanotify_event_path()
463 else if (event->type == FANOTIFY_EVENT_TYPE_PATH_PERM) in fanotify_event_path()
464 return &FANOTIFY_PERM(event)->path; in fanotify_event_path()
487 struct fanotify_event *event) in fanotify_event_hash_bucket() argument
489 return event->hash & FANOTIFY_HTABLE_MASK; in fanotify_event_hash_bucket()