kernel-ark/fs/notify
Lino Sanfilippo 23e964c284 fsnotify: use reference counting for groups
Get a group ref for each mark that is added to the groups list and release that
ref when the mark is freed in fsnotify_put_mark().
We also use get a group reference for duplicated marks and for private event
data.
Now we dont free a group any more when the number of marks becomes 0 but when
the groups ref count does. Since this will only happen when all marks are removed
from a groups mark list, we dont have to set the groups number of marks to 1 at
group creation.

Beside clearing all marks in fsnotify_destroy_group() we do also flush the
groups event queue. This is since events may hold references to groups (due to
private event data) and we have to put those references first before we get a
chance to put the final ref, which will result in a call to
fsnotify_final_destroy_group().

Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Eric Paris <eparis@redhat.com>
2012-12-11 13:29:44 -05:00
..
dnotify fanotify: use both marks when possible 2010-07-28 10:18:55 -04:00
fanotify inotify, fanotify: replace fsnotify_put_group() with fsnotify_destroy_group() 2012-12-11 13:29:43 -05:00
inotify fsnotify: use reference counting for groups 2012-12-11 13:29:44 -05:00
fsnotify.c vfs: switch i_dentry/d_alias to hlist 2012-07-14 16:32:55 +04:00
fsnotify.h fsnotify: remove global fsnotify groups lists 2010-07-28 10:18:54 -04:00
group.c fsnotify: use reference counting for groups 2012-12-11 13:29:44 -05:00
inode_mark.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
Kconfig fanotify: allow fanotify to be built 2010-10-28 17:22:13 -04:00
Makefile fsnotify: vfsmount marks generic functions 2010-07-28 09:58:57 -04:00
mark.c fsnotify: use reference counting for groups 2012-12-11 13:29:44 -05:00
notification.c fs/notify/notification.c: make subsys_initcall function static 2012-03-23 16:58:31 -07:00
vfsmount_mark.c vfs: move fsnotify junk to struct mount 2012-01-03 22:57:12 -05:00