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()
46 void fsnotify_group_stop_queueing(struct fsnotify_group *group) in fsnotify_group_stop_queueing() argument
48 spin_lock(&group->notification_lock); in fsnotify_group_stop_queueing()
49 group->shutdown = true; in fsnotify_group_stop_queueing()
50 spin_unlock(&group->notification_lock); in fsnotify_group_stop_queueing()
59 void fsnotify_destroy_group(struct fsnotify_group *group) in fsnotify_destroy_group() argument
67 fsnotify_group_stop_queueing(group); in fsnotify_destroy_group()
70 fsnotify_detach_group_marks(group); in fsnotify_destroy_group()
84 fsnotify_flush_notify(group); in fsnotify_destroy_group()
90 if (group->overflow_event) in fsnotify_destroy_group()
91 group->ops->free_event(group->overflow_event); in fsnotify_destroy_group()
93 fsnotify_put_group(group); in fsnotify_destroy_group()
99 void fsnotify_get_group(struct fsnotify_group *group) in fsnotify_get_group() argument
101 atomic_inc(&group->refcnt); in fsnotify_get_group()
107 void fsnotify_put_group(struct fsnotify_group *group) in fsnotify_put_group() argument
109 if (atomic_dec_and_test(&group->refcnt)) in fsnotify_put_group()
110 fsnotify_final_destroy_group(group); in fsnotify_put_group()
118 struct fsnotify_group *group; in fsnotify_alloc_group() local
120 group = kzalloc(sizeof(struct fsnotify_group), GFP_KERNEL); in fsnotify_alloc_group()
121 if (!group) in fsnotify_alloc_group()
125 atomic_set(&group->refcnt, 1); in fsnotify_alloc_group()
126 atomic_set(&group->num_marks, 0); in fsnotify_alloc_group()
128 spin_lock_init(&group->notification_lock); in fsnotify_alloc_group()
129 INIT_LIST_HEAD(&group->notification_list); in fsnotify_alloc_group()
130 init_waitqueue_head(&group->notification_waitq); in fsnotify_alloc_group()
131 group->max_events = UINT_MAX; in fsnotify_alloc_group()
133 mutex_init(&group->mark_mutex); in fsnotify_alloc_group()
134 INIT_LIST_HEAD(&group->marks_list); in fsnotify_alloc_group()
136 group->ops = ops; in fsnotify_alloc_group()
138 return group; in fsnotify_alloc_group()
143 struct fsnotify_group *group = file->private_data; in fsnotify_fasync() local
145 return fasync_helper(fd, file, on, &group->fsn_fa) >= 0 ? 0 : -EIO; in fsnotify_fasync()