Lines Matching refs:event

13 /* Possible states of the permission event */
237 * userspace. The type of event determines how it was allocated, how it will
266 static inline void fanotify_init_event(struct fanotify_event *event,
269 fsnotify_init_event(&event->fse);
270 INIT_HLIST_NODE(&event->merge_list);
271 event->hash = hash;
272 event->mask = mask;
273 event->pid = NULL;
291 FANOTIFY_FE(struct fanotify_event *event)
293 return container_of(event, struct fanotify_fid_event, fae);
303 FANOTIFY_NE(struct fanotify_event *event)
305 return container_of(event, struct fanotify_name_event, fae);
319 FANOTIFY_EE(struct fanotify_event *event)
321 return container_of(event, struct fanotify_error_event, fae);
324 static inline __kernel_fsid_t *fanotify_event_fsid(struct fanotify_event *event)
326 if (event->type == FANOTIFY_EVENT_TYPE_FID)
327 return &FANOTIFY_FE(event)->fsid;
328 else if (event->type == FANOTIFY_EVENT_TYPE_FID_NAME)
329 return &FANOTIFY_NE(event)->fsid;
330 else if (event->type == FANOTIFY_EVENT_TYPE_FS_ERROR)
331 return &FANOTIFY_EE(event)->fsid;
337 struct fanotify_event *event)
339 if (event->type == FANOTIFY_EVENT_TYPE_FID)
340 return &FANOTIFY_FE(event)->object_fh;
341 else if (event->type == FANOTIFY_EVENT_TYPE_FID_NAME)
342 return fanotify_info_file_fh(&FANOTIFY_NE(event)->info);
343 else if (event->type == FANOTIFY_EVENT_TYPE_FS_ERROR)
344 return &FANOTIFY_EE(event)->object_fh;
350 struct fanotify_event *event)
352 if (event->type == FANOTIFY_EVENT_TYPE_FID_NAME)
353 return &FANOTIFY_NE(event)->info;
358 static inline int fanotify_event_object_fh_len(struct fanotify_event *event)
360 struct fanotify_info *info = fanotify_event_info(event);
361 struct fanotify_fh *fh = fanotify_event_object_fh(event);
369 static inline int fanotify_event_dir_fh_len(struct fanotify_event *event)
371 struct fanotify_info *info = fanotify_event_info(event);
376 static inline int fanotify_event_dir2_fh_len(struct fanotify_event *event)
378 struct fanotify_info *info = fanotify_event_info(event);
383 static inline bool fanotify_event_has_object_fh(struct fanotify_event *event)
386 if (event->type == FANOTIFY_EVENT_TYPE_FS_ERROR)
388 return fanotify_event_object_fh_len(event) > 0;
391 static inline bool fanotify_event_has_dir_fh(struct fanotify_event *event)
393 return fanotify_event_dir_fh_len(event) > 0;
396 static inline bool fanotify_event_has_dir2_fh(struct fanotify_event *event)
398 return fanotify_event_dir2_fh_len(event) > 0;
401 static inline bool fanotify_event_has_any_dir_fh(struct fanotify_event *event)
403 return fanotify_event_has_dir_fh(event) ||
404 fanotify_event_has_dir2_fh(event);
413 FANOTIFY_PE(struct fanotify_event *event)
415 return container_of(event, struct fanotify_path_event, fae);
428 u32 response; /* userspace answer to the event */
429 unsigned short state; /* state of the event */
430 int fd; /* fd we passed to userspace for this event */
438 FANOTIFY_PERM(struct fanotify_event *event)
440 return container_of(event, struct fanotify_perm_event, fae);
459 static inline const struct path *fanotify_event_path(struct fanotify_event *event)
461 if (event->type == FANOTIFY_EVENT_TYPE_PATH)
462 return &FANOTIFY_PE(event)->path;
463 else if (event->type == FANOTIFY_EVENT_TYPE_PATH_PERM)
464 return &FANOTIFY_PERM(event)->path;
477 * Permission events and overflow event do not get merged - don't hash them.
487 struct fanotify_event *event)
489 return event->hash & FANOTIFY_HTABLE_MASK;