summaryrefslogtreecommitdiffstats
path: root/fs/notify/group.c
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2009-12-17 21:24:22 -0500
committerEric Paris <eparis@redhat.com>2010-07-28 09:58:50 -0400
commitffab83402f01555a5fa32efb48a4dd0ce8d12ef5 (patch)
tree4e02fa7422becb56e6ed4b8721f8b0fb3a867d44 /fs/notify/group.c
parentcd7752ce7cac5184ca35aecebffafae9662570bc (diff)
downloadblackbird-op-linux-ffab83402f01555a5fa32efb48a4dd0ce8d12ef5.tar.gz
blackbird-op-linux-ffab83402f01555a5fa32efb48a4dd0ce8d12ef5.zip
fsnotify: fsnotify_obtain_group should be fsnotify_alloc_group
fsnotify_obtain_group was intended to be able to find an already existing group. Nothing uses that functionality. This just renames it to fsnotify_alloc_group so it is clear what it is doing. Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'fs/notify/group.c')
-rw-r--r--fs/notify/group.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/notify/group.c b/fs/notify/group.c
index 934860e98095..1d20d26d5fee 100644
--- a/fs/notify/group.c
+++ b/fs/notify/group.c
@@ -162,16 +162,13 @@ void fsnotify_put_group(struct fsnotify_group *group)
}
/*
- * Either finds an existing group which matches the group_num, mask, and ops or
- * creates a new group and adds it to the global group list. In either case we
- * take a reference for the group returned.
+ * Create a new fsnotify_group and hold a reference for the group returned.
*/
-struct fsnotify_group *fsnotify_obtain_group(__u32 mask,
- const struct fsnotify_ops *ops)
+struct fsnotify_group *fsnotify_alloc_group(__u32 mask,
+ const struct fsnotify_ops *ops)
{
struct fsnotify_group *group;
- /* very low use, simpler locking if we just always alloc */
group = kzalloc(sizeof(struct fsnotify_group), GFP_KERNEL);
if (!group)
return ERR_PTR(-ENOMEM);
@@ -192,7 +189,6 @@ struct fsnotify_group *fsnotify_obtain_group(__u32 mask,
mutex_lock(&fsnotify_grp_mutex);
- /* group not found, add a new one */
list_add_rcu(&group->group_list, &fsnotify_groups);
group->on_group_list = 1;
/* being on the fsnotify_groups list holds one num_marks */
OpenPOWER on IntegriCloud