Lines Matching refs:group

10  * The group->recnt and mark->refcnt tell how many "things" in the kernel
13 * the reference a group and a mark hold to each other.
21 * group->mark_mutex
25 * group->mark_mutex protects the marks_list anchored inside a given group and
27 * data (i.e group limits).
30 * Furthermore it protects the access to a reference of the group that the mark
45 * mark->connector set until we drop group->mark_mutex.
138 * this by holding a mark->lock or mark->group->mark_mutex for a mark on this
201 struct fsnotify_group *group = mark->group;
203 if (WARN_ON_ONCE(!group))
205 group->ops->free_mark(mark);
206 fsnotify_put_group(group);
286 * Also pin the group so it doesn't disappear under us.
296 /* mark is attached, group is still alive then */
297 atomic_inc(&mark->group->user_waits);
308 * Puts marks and wakes up group destruction if necessary.
315 struct fsnotify_group *group = mark->group;
319 * We abuse notification_waitq on group shutdown for waiting for
322 if (atomic_dec_and_test(&group->user_waits) && group->shutdown)
323 wake_up(&group->notification_waitq);
366 * Mark mark as detached, remove it from group list. Mark still stays in object
368 * removed from group list before corresponding reference to it is dropped. In
370 * group->mark_mutex if we found the mark through g_list.
372 * Must be called with group->mark_mutex held. The caller must either hold
377 struct fsnotify_group *group = mark->group;
379 WARN_ON_ONCE(!mutex_is_locked(&group->mark_mutex));
394 atomic_dec(&group->num_marks);
410 struct fsnotify_group *group = mark->group;
423 * callback to the group function to let it know that this mark
426 if (group->ops->freeing_mark)
427 group->ops->freeing_mark(mark, group);
431 struct fsnotify_group *group)
433 mutex_lock(&group->mark_mutex);
435 mutex_unlock(&group->mark_mutex);
444 * notification group). Events shall be passed to notification groups in
450 * and vfsmount marks of each group together. Using the group address as
544 * to which group and for which inodes. These marks are ordered according to
545 * priority, highest number first, and then by the group's location in memory.
605 if ((lmark->group == mark->group) &&
612 cmp = fsnotify_compare_groups(lmark->group, mark->group);
636 * Attach an initialized mark to a given group and fs object.
638 * event types should be delivered to which group.
644 struct fsnotify_group *group = mark->group;
647 BUG_ON(!mutex_is_locked(&group->mark_mutex));
651 * group->mark_mutex
658 list_add(&mark->g_list, &group->marks_list);
659 atomic_inc(&group->num_marks);
677 atomic_dec(&group->num_marks);
687 struct fsnotify_group *group = mark->group;
689 mutex_lock(&group->mark_mutex);
691 mutex_unlock(&group->mark_mutex);
697 * Given a list of marks, find the mark associated with given group. If found
701 struct fsnotify_group *group)
711 if (mark->group == group &&
723 /* Clear any marks in a group with given type mask */
724 void fsnotify_clear_marks_by_group(struct fsnotify_group *group,
733 head = &group->marks_list;
745 mutex_lock(&group->mark_mutex);
746 list_for_each_entry_safe(mark, lmark, &group->marks_list, g_list) {
750 mutex_unlock(&group->mark_mutex);
754 mutex_lock(&group->mark_mutex);
756 mutex_unlock(&group->mark_mutex);
762 mutex_unlock(&group->mark_mutex);
792 fsnotify_destroy_mark(mark, mark->group);
811 struct fsnotify_group *group)
816 fsnotify_get_group(group);
817 mark->group = group;