Lines Matching refs:group

50 void fsnotify_destroy_event(struct fsnotify_group *group,  in fsnotify_destroy_event()  argument
54 if (!event || event == group->overflow_event) in fsnotify_destroy_event()
63 spin_lock(&group->notification_lock); in fsnotify_destroy_event()
65 spin_unlock(&group->notification_lock); in fsnotify_destroy_event()
67 group->ops->free_event(group, event); in fsnotify_destroy_event()
81 int fsnotify_insert_event(struct fsnotify_group *group, in fsnotify_insert_event() argument
89 struct list_head *list = &group->notification_list; in fsnotify_insert_event()
91 pr_debug("%s: group=%p event=%p\n", __func__, group, event); in fsnotify_insert_event()
93 spin_lock(&group->notification_lock); in fsnotify_insert_event()
95 if (group->shutdown) { in fsnotify_insert_event()
96 spin_unlock(&group->notification_lock); in fsnotify_insert_event()
100 if (event == group->overflow_event || in fsnotify_insert_event()
101 group->q_len >= group->max_events) { in fsnotify_insert_event()
104 if (!list_empty(&group->overflow_event->list)) { in fsnotify_insert_event()
105 spin_unlock(&group->notification_lock); in fsnotify_insert_event()
108 event = group->overflow_event; in fsnotify_insert_event()
113 ret = merge(group, event); in fsnotify_insert_event()
115 spin_unlock(&group->notification_lock); in fsnotify_insert_event()
121 group->q_len++; in fsnotify_insert_event()
124 insert(group, event); in fsnotify_insert_event()
125 spin_unlock(&group->notification_lock); in fsnotify_insert_event()
127 wake_up(&group->notification_waitq); in fsnotify_insert_event()
128 kill_fasync(&group->fsn_fa, SIGIO, POLL_IN); in fsnotify_insert_event()
132 void fsnotify_remove_queued_event(struct fsnotify_group *group, in fsnotify_remove_queued_event() argument
135 assert_spin_locked(&group->notification_lock); in fsnotify_remove_queued_event()
141 group->q_len--; in fsnotify_remove_queued_event()
148 struct fsnotify_event *fsnotify_peek_first_event(struct fsnotify_group *group) in fsnotify_peek_first_event() argument
150 assert_spin_locked(&group->notification_lock); in fsnotify_peek_first_event()
152 if (fsnotify_notify_queue_is_empty(group)) in fsnotify_peek_first_event()
155 return list_first_entry(&group->notification_list, in fsnotify_peek_first_event()
163 struct fsnotify_event *fsnotify_remove_first_event(struct fsnotify_group *group) in fsnotify_remove_first_event() argument
165 struct fsnotify_event *event = fsnotify_peek_first_event(group); in fsnotify_remove_first_event()
170 pr_debug("%s: group=%p event=%p\n", __func__, group, event); in fsnotify_remove_first_event()
172 fsnotify_remove_queued_event(group, event); in fsnotify_remove_first_event()
181 void fsnotify_flush_notify(struct fsnotify_group *group) in fsnotify_flush_notify() argument
185 spin_lock(&group->notification_lock); in fsnotify_flush_notify()
186 while (!fsnotify_notify_queue_is_empty(group)) { in fsnotify_flush_notify()
187 event = fsnotify_remove_first_event(group); in fsnotify_flush_notify()
188 spin_unlock(&group->notification_lock); in fsnotify_flush_notify()
189 fsnotify_destroy_event(group, event); in fsnotify_flush_notify()
190 spin_lock(&group->notification_lock); in fsnotify_flush_notify()
192 spin_unlock(&group->notification_lock); in fsnotify_flush_notify()