• Home
  • Raw
  • Download

Lines Matching refs:group

22 static void fsnotify_final_destroy_group(struct fsnotify_group *group)  in fsnotify_final_destroy_group()  argument
24 if (group->ops->free_group_priv) in fsnotify_final_destroy_group()
25 group->ops->free_group_priv(group); in fsnotify_final_destroy_group()
27 mem_cgroup_put(group->memcg); in fsnotify_final_destroy_group()
29 kfree(group); in fsnotify_final_destroy_group()
36 void fsnotify_group_stop_queueing(struct fsnotify_group *group) in fsnotify_group_stop_queueing() argument
38 spin_lock(&group->notification_lock); in fsnotify_group_stop_queueing()
39 group->shutdown = true; in fsnotify_group_stop_queueing()
40 spin_unlock(&group->notification_lock); in fsnotify_group_stop_queueing()
49 void fsnotify_destroy_group(struct fsnotify_group *group) in fsnotify_destroy_group() argument
57 fsnotify_group_stop_queueing(group); in fsnotify_destroy_group()
60 fsnotify_clear_marks_by_group(group, FSNOTIFY_OBJ_ALL_TYPES_MASK); in fsnotify_destroy_group()
67 wait_event(group->notification_waitq, !atomic_read(&group->user_waits)); in fsnotify_destroy_group()
83 fsnotify_flush_notify(group); in fsnotify_destroy_group()
89 if (group->overflow_event) in fsnotify_destroy_group()
90 group->ops->free_event(group->overflow_event); in fsnotify_destroy_group()
92 fsnotify_put_group(group); in fsnotify_destroy_group()
98 void fsnotify_get_group(struct fsnotify_group *group) in fsnotify_get_group() argument
100 refcount_inc(&group->refcnt); in fsnotify_get_group()
106 void fsnotify_put_group(struct fsnotify_group *group) in fsnotify_put_group() argument
108 if (refcount_dec_and_test(&group->refcnt)) in fsnotify_put_group()
109 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 refcount_set(&group->refcnt, 1); in fsnotify_alloc_group()
126 atomic_set(&group->num_marks, 0); in fsnotify_alloc_group()
127 atomic_set(&group->user_waits, 0); in fsnotify_alloc_group()
129 spin_lock_init(&group->notification_lock); in fsnotify_alloc_group()
130 INIT_LIST_HEAD(&group->notification_list); in fsnotify_alloc_group()
131 init_waitqueue_head(&group->notification_waitq); in fsnotify_alloc_group()
132 group->max_events = UINT_MAX; in fsnotify_alloc_group()
134 mutex_init(&group->mark_mutex); in fsnotify_alloc_group()
135 INIT_LIST_HEAD(&group->marks_list); in fsnotify_alloc_group()
137 group->ops = ops; in fsnotify_alloc_group()
139 return group; in fsnotify_alloc_group()
145 struct fsnotify_group *group = file->private_data; in fsnotify_fasync() local
147 return fasync_helper(fd, file, on, &group->fsn_fa) >= 0 ? 0 : -EIO; in fsnotify_fasync()