aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLino Sanfilippo <LinoSanfilippo@gmx.de>2011-06-14 11:29:45 -0400
committerEric Paris <eparis@redhat.com>2012-12-11 13:29:43 -0500
commitd8153d4d8b7b6141770e1416c4a338161205ed1b (patch)
treee353338c1b5be16c5b0d2bc4f1f698d982a00319 /include/linux
parenta0d271cbfed1dd50278c6b06bead3d00ba0a88f9 (diff)
inotify, fanotify: replace fsnotify_put_group() with fsnotify_destroy_group()
Currently in fsnotify_put_group() the ref count of a group is decremented and if it becomes 0 fsnotify_destroy_group() is called. Since a groups ref count is only at group creation set to 1 and never increased after that a call to fsnotify_put_group() always results in a call to fsnotify_destroy_group(). With this patch fsnotify_destroy_group() is called directly. Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de> Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fsnotify_backend.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h
index 63d966d5c2ea..d2ad345bdeec 100644
--- a/include/linux/fsnotify_backend.h
+++ b/include/linux/fsnotify_backend.h
@@ -364,7 +364,8 @@ static inline void __fsnotify_d_instantiate(struct dentry *dentry, struct inode
364extern struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops); 364extern struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops);
365/* drop reference on a group from fsnotify_alloc_group */ 365/* drop reference on a group from fsnotify_alloc_group */
366extern void fsnotify_put_group(struct fsnotify_group *group); 366extern void fsnotify_put_group(struct fsnotify_group *group);
367 367/* destroy group */
368extern void fsnotify_destroy_group(struct fsnotify_group *group);
368/* take a reference to an event */ 369/* take a reference to an event */
369extern void fsnotify_get_event(struct fsnotify_event *event); 370extern void fsnotify_get_event(struct fsnotify_event *event);
370extern void fsnotify_put_event(struct fsnotify_event *event); 371extern void fsnotify_put_event(struct fsnotify_event *event);