Lines Matching refs:group
34 static void fsnotify_final_destroy_group(struct fsnotify_group *group) in fsnotify_final_destroy_group() argument
36 if (group->ops->free_group_priv) in fsnotify_final_destroy_group()
37 group->ops->free_group_priv(group); in fsnotify_final_destroy_group()
39 kfree(group); in fsnotify_final_destroy_group()
48 void fsnotify_destroy_group(struct fsnotify_group *group) in fsnotify_destroy_group() argument
51 fsnotify_clear_marks_by_group(group); in fsnotify_destroy_group()
56 fsnotify_flush_notify(group); in fsnotify_destroy_group()
62 if (group->overflow_event) in fsnotify_destroy_group()
63 group->ops->free_event(group->overflow_event); in fsnotify_destroy_group()
65 fsnotify_put_group(group); in fsnotify_destroy_group()
71 void fsnotify_get_group(struct fsnotify_group *group) in fsnotify_get_group() argument
73 atomic_inc(&group->refcnt); in fsnotify_get_group()
79 void fsnotify_put_group(struct fsnotify_group *group) in fsnotify_put_group() argument
81 if (atomic_dec_and_test(&group->refcnt)) in fsnotify_put_group()
82 fsnotify_final_destroy_group(group); in fsnotify_put_group()
90 struct fsnotify_group *group; in fsnotify_alloc_group() local
92 group = kzalloc(sizeof(struct fsnotify_group), GFP_KERNEL); in fsnotify_alloc_group()
93 if (!group) in fsnotify_alloc_group()
97 atomic_set(&group->refcnt, 1); in fsnotify_alloc_group()
98 atomic_set(&group->num_marks, 0); in fsnotify_alloc_group()
100 mutex_init(&group->notification_mutex); in fsnotify_alloc_group()
101 INIT_LIST_HEAD(&group->notification_list); in fsnotify_alloc_group()
102 init_waitqueue_head(&group->notification_waitq); in fsnotify_alloc_group()
103 group->max_events = UINT_MAX; in fsnotify_alloc_group()
105 mutex_init(&group->mark_mutex); in fsnotify_alloc_group()
106 INIT_LIST_HEAD(&group->marks_list); in fsnotify_alloc_group()
108 group->ops = ops; in fsnotify_alloc_group()
110 return group; in fsnotify_alloc_group()
115 struct fsnotify_group *group = file->private_data; in fsnotify_fasync() local
117 return fasync_helper(fd, file, on, &group->fsn_fa) >= 0 ? 0 : -EIO; in fsnotify_fasync()