Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207635
b: refs/heads/master
c: 36fddeb
h: refs/heads/master
i:
  207633: 8ea83b4
  207631: efc58a6
v: v3
  • Loading branch information
Eric Paris committed Jul 28, 2010
1 parent c92a9d7 commit 80e003a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 19c2a0e1a2f60112c158342ba5f568f72b741c2c
refs/heads/master: 36fddebaa8a9186d4f5817ab798a83400b2fb2e7
10 changes: 7 additions & 3 deletions trunk/fs/notify/group.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ static void fsnotify_add_group(struct fsnotify_group *group)
BUG_ON(!mutex_is_locked(&fsnotify_grp_mutex));

group->on_inode_group_list = 1;
/* being on the fsnotify_groups list holds one num_marks */
atomic_inc(&group->num_marks);

list_add_tail_rcu(&group->inode_group_list, &fsnotify_inode_groups);
}

Expand Down Expand Up @@ -183,7 +180,14 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops)
if (!group)
return ERR_PTR(-ENOMEM);

/* set to 0 when there a no external references to this group */
atomic_set(&group->refcnt, 1);
/*
* hits 0 when there are no external references AND no marks for
* this group
*/
atomic_set(&group->num_marks, 1);


mutex_init(&group->notification_mutex);
INIT_LIST_HEAD(&group->notification_list);
Expand Down

0 comments on commit 80e003a

Please sign in to comment.