Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347895
b: refs/heads/master
c: 9861295
h: refs/heads/master
i:
  347893: 0a6f060
  347891: ff38989
  347887: 7e1a772
v: v3
  • Loading branch information
Lino Sanfilippo authored and Eric Paris committed Dec 11, 2012
1 parent f9040ef commit f3783af
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 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: d8153d4d8b7b6141770e1416c4a338161205ed1b
refs/heads/master: 986129520479d689962a42c31acdeaf854ac91f5
8 changes: 8 additions & 0 deletions trunk/fs/notify/group.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ void fsnotify_destroy_group(struct fsnotify_group *group)
fsnotify_final_destroy_group(group);
}

/*
* Get reference to a group.
*/
void fsnotify_get_group(struct fsnotify_group *group)
{
atomic_inc(&group->refcnt);
}

/*
* Drop a reference to a group. Free it if it's through.
*/
Expand Down
4 changes: 3 additions & 1 deletion trunk/include/linux/fsnotify_backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,10 @@ static inline void __fsnotify_d_instantiate(struct dentry *dentry, struct inode

/* called from fsnotify listeners, such as fanotify or dnotify */

/* get a reference to an existing or create a new group */
/* create a new group */
extern struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops);
/* get reference to a group */
extern void fsnotify_get_group(struct fsnotify_group *group);
/* drop reference on a group from fsnotify_alloc_group */
extern void fsnotify_put_group(struct fsnotify_group *group);
/* destroy group */
Expand Down

0 comments on commit f3783af

Please sign in to comment.