Lines Matching full: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) in fsnotify_destroy_event() argument
61 if (!event || event == group->overflow_event) in fsnotify_destroy_event()
64 * If the event is still queued, we have a problem... Do an unreliable in fsnotify_destroy_event()
67 * from the list by a different CPU than the one freeing the event. in fsnotify_destroy_event()
69 if (!list_empty(&event->list)) { in fsnotify_destroy_event()
71 WARN_ON(!list_empty(&event->list)); in fsnotify_destroy_event()
74 group->ops->free_event(event); in fsnotify_destroy_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, in fsnotify_add_event() argument
92 pr_debug("%s: group=%p event=%p\n", __func__, group, event); in fsnotify_add_event()
101 if (event == group->overflow_event || in fsnotify_add_event()
104 /* Queue overflow event only if it isn't already queued */ in fsnotify_add_event()
109 event = group->overflow_event; in fsnotify_add_event()
114 ret = merge(list, event); in fsnotify_add_event()
123 list_add_tail(&event->list, list); in fsnotify_add_event()
132 struct fsnotify_event *event) in fsnotify_remove_queued_event() argument
136 * We need to init list head for the case of overflow event so that in fsnotify_remove_queued_event()
139 list_del_init(&event->list); in fsnotify_remove_queued_event()
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; in fsnotify_remove_first_event() local
155 event = list_first_entry(&group->notification_list, in fsnotify_remove_first_event()
157 fsnotify_remove_queued_event(group, event); in fsnotify_remove_first_event()
158 return event; in fsnotify_remove_first_event()
162 * This will not remove the event, that must be done with
175 * event notifications.
179 struct fsnotify_event *event; in fsnotify_flush_notify() local
183 event = fsnotify_remove_first_event(group); in fsnotify_flush_notify()
185 fsnotify_destroy_event(group, event); in fsnotify_flush_notify()