return container_of(event, struct fanotify_fid_event, fae);
}
-static inline bool fanotify_event_has_fid(struct fanotify_event *event)
-{
- return event->type == FANOTIFY_EVENT_TYPE_FID;
-}
-
static inline __kernel_fsid_t *fanotify_event_fsid(struct fanotify_event *event)
{
if (event->type == FANOTIFY_EVENT_TYPE_FID)
metadata.mask = event->mask & FANOTIFY_OUTGOING_EVENTS;
metadata.pid = pid_vnr(event->pid);
- if (fanotify_event_has_fid(event)) {
+ if (fanotify_event_object_fh(event)) {
metadata.event_len += fanotify_event_info_len(event);
} else if (path && path->mnt && path->dentry) {
fd = create_fd(group, path, &f);
if (f) {
fd_install(fd, f);
- } else if (fanotify_event_has_fid(event)) {
+ } else if (fanotify_event_object_fh(event)) {
ret = copy_fid_to_user(fanotify_event_fsid(event),
fanotify_event_object_fh(event),
buf + FAN_EVENT_METADATA_LEN);