/* When a new group registers or changes it's set of interesting events this function updates the fsnotify_mask to contain all interesting events  */
void fsnotify_recalc_global_mask(void)
/* When a new group registers or changes it's set of interesting events this function updates the fsnotify_mask to contain all interesting events  */
void fsnotify_recalc_global_mask(void)
{
	struct fsnotify_group *group;
	__u32 mask = 0;
	int idx;
	idx = srcu_read_lock(&fsnotify_grp_srcu);
	list_for_each_entry_rcu(group, &fsnotify_groups, group_list)
		mask |= group->mask;
	srcu_read_unlock(&fsnotify_grp_srcu, idx);
	fsnotify_mask = mask;
}