From f3783af37775d2c3dda0e0fa12094b8d7353ed99 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Tue, 14 Jun 2011 17:29:46 +0200 Subject: [PATCH] --- yaml --- r: 347895 b: refs/heads/master c: 986129520479d689962a42c31acdeaf854ac91f5 h: refs/heads/master i: 347893: 0a6f0608c6731663e3ecbc0c23ba80d828f02be9 347891: ff38989c9dc34d779fc1fc654390a452b4205240 347887: 7e1a77266f080e719b60a5071773340b7784a3c1 v: v3 --- [refs] | 2 +- trunk/fs/notify/group.c | 8 ++++++++ trunk/include/linux/fsnotify_backend.h | 4 +++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 29cf451730df..96832ea9c2b9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d8153d4d8b7b6141770e1416c4a338161205ed1b +refs/heads/master: 986129520479d689962a42c31acdeaf854ac91f5 diff --git a/trunk/fs/notify/group.c b/trunk/fs/notify/group.c index cfda328c3d11..1d57c35f1043 100644 --- a/trunk/fs/notify/group.c +++ b/trunk/fs/notify/group.c @@ -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. */ diff --git a/trunk/include/linux/fsnotify_backend.h b/trunk/include/linux/fsnotify_backend.h index d2ad345bdeec..e76cef75295d 100644 --- a/trunk/include/linux/fsnotify_backend.h +++ b/trunk/include/linux/fsnotify_backend.h @@ -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 */