Lines Matching defs:event

9  * the event happened.  When inotify gets an event it will need to add that
10 * event to the group notify queue. Since a single event might need to be on
11 * multiple group's notification queues we can't add the event directly to each
13 * has a pointer back to the original event. Since the majority of events are
15 * event_holder into each event. This means we have a single allocation instead
58 struct fsnotify_event *event)
61 if (!event || event == group->overflow_event)
64 * If the event is still queued, we have a problem... Do an unreliable
67 * from the list by a different CPU than the one freeing the event.
69 if (!list_empty(&event->list)) {
71 WARN_ON(!list_empty(&event->list));
74 group->ops->free_event(event);
78 * Add an event to the group notification queue. The group can later pull this
79 * event off the queue to deal with. The function returns 0 if the event was
80 * added to the queue, 1 if the event was merged with some other queued event,
81 * 2 if the event was not queued - either the queue of events has overflown
85 struct fsnotify_event *event,
92 pr_debug("%s: group=%p event=%p\n", __func__, group, event);
101 if (event == group->overflow_event ||
104 /* Queue overflow event only if it isn't already queued */
109 event = group->overflow_event;
114 ret = merge(list, event);
123 list_add_tail(&event->list, list);
132 struct fsnotify_event *event)
136 * We need to init list head for the case of overflow event so that
139 list_del_init(&event->list);
144 * Remove and return the first event from the notification list. It is the
145 * responsibility of the caller to destroy the obtained event
149 struct fsnotify_event *event;
155 event = list_first_entry(&group->notification_list,
157 fsnotify_remove_queued_event(group, event);
158 return event;
162 * This will not remove the event, that must be done with
175 * event notifications.
179 struct fsnotify_event *event;
183 event = fsnotify_remove_first_event(group);
185 fsnotify_destroy_event(group, event);