linux-stable/fs/notify/inotify
Jan Kara 11375145a7 fsnotify: Move queueing of mark for destruction into fsnotify_put_mark()
Currently we queue mark into a list of marks for destruction in
__fsnotify_free_mark() and keep the last mark reference dangling. After the
worker waits for SRCU period, it drops the last reference to the mark
which frees it. This scheme has the disadvantage that if we hold
reference to a mark and drop and reacquire SRCU lock, the mark can get
freed immediately which is slightly inconvenient and we will need to
avoid this in the future.

Move to a scheme where queueing of mark into a list of marks for
destruction happens when the last reference to the mark is dropped. Also
drop reference to the mark held by group list already when mark is
removed from that list instead of dropping it only from the destruction
worker.

Reviewed-by: Miklos Szeredi <mszeredi@redhat.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
2017-04-10 17:37:35 +02:00
..
inotify.h inotify: Convert to using per-namespace limits 2017-01-24 12:03:07 +13:00
inotify_fsnotify.c inotify: Remove inode pointers from debug messages 2017-04-03 16:56:34 +02:00
inotify_user.c fsnotify: Move queueing of mark for destruction into fsnotify_put_mark() 2017-04-10 17:37:35 +02:00
Kconfig inotify: remove inotify in kernel interface 2010-07-28 09:58:31 -04:00
Makefile inotify: remove inotify in kernel interface 2010-07-28 09:58:31 -04:00