• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/fs/notify/

Lines Matching defs:group

32  * Final freeing of a group
34 void fsnotify_final_destroy_group(struct fsnotify_group *group)
37 fsnotify_flush_notify(group);
39 if (group->ops->free_group_priv)
40 group->ops->free_group_priv(group);
42 kfree(group);
46 * Trying to get rid of a group. We need to first get rid of any outstanding
47 * allocations and then free the group. Remember that fsnotify_clear_marks_by_group
49 * hold a reference to this group (via group->num_marks) If we get into that
53 static void fsnotify_destroy_group(struct fsnotify_group *group)
55 /* clear all inode marks for this group */
56 fsnotify_clear_marks_by_group(group);
61 if (atomic_dec_and_test(&group->num_marks))
62 fsnotify_final_destroy_group(group);
66 * Drop a reference to a group. Free it if it's through.
68 void fsnotify_put_group(struct fsnotify_group *group)
70 if (atomic_dec_and_test(&group->refcnt))
71 fsnotify_destroy_group(group);
75 * Create a new fsnotify_group and hold a reference for the group returned.
79 struct fsnotify_group *group;
81 group = kzalloc(sizeof(struct fsnotify_group), GFP_KERNEL);
82 if (!group)
85 /* set to 0 when there a no external references to this group */
86 atomic_set(&group->refcnt, 1);
89 * this group
91 atomic_set(&group->num_marks, 1);
93 mutex_init(&group->notification_mutex);
94 INIT_LIST_HEAD(&group->notification_list);
95 init_waitqueue_head(&group->notification_waitq);
96 group->max_events = UINT_MAX;
98 spin_lock_init(&group->mark_lock);
99 INIT_LIST_HEAD(&group->marks_list);
101 group->ops = ops;
103 return group;