/* Update the group->mask by running all of the marks associated with this group and finding the bitwise | of all of the mark->mask. If we change the group->mask we need to update the global mask of events interesting to the system.  */
void fsnotify_recalc_group_mask(struct fsnotify_group *group)
/* Update the group->mask by running all of the marks associated with this group and finding the bitwise | of all of the mark->mask. If we change the group->mask we need to update the global mask of events interesting to the system.  */
void fsnotify_recalc_group_mask(struct fsnotify_group *group)
{
	__u32 mask = 0;
	__u32 old_mask = group->mask;
	struct fsnotify_mark_entry *entry;
	spin_lock(&group->mark_lock);
	list_for_each_entry(entry, &group->mark_entries, g_list)
		mask |= entry->mask;
	spin_unlock(&group->mark_lock);
	group->mask = mask;
	if (old_mask != mask)
		fsnotify_recalc_global_mask();
}