inotify: allow users to request not to recieve events on unlinked children
authorEric Paris <eparis@redhat.com>
Wed, 28 Jul 2010 14:18:37 +0000 (10:18 -0400)
committerEric Paris <eparis@redhat.com>
Wed, 28 Jul 2010 14:18:49 +0000 (10:18 -0400)
commit8c1934c8d70b22ca8333b216aec6c7d09fdbd6a6
tree25fffb46e0b1594aa692ed10e755b6ae041022bc
parent611da04f7a31b2208e838be55a42c7a1310ae321
inotify: allow users to request not to recieve events on unlinked children

An inotify watch on a directory will send events for children even if those
children have been unlinked.  This patch add a new inotify flag IN_EXCL_UNLINK
which allows a watch to specificy they don't care about unlinked children.
This should fix performance problems seen by tasks which add a watch to
/tmp and then are overrun with events when other processes are reading and
writing to unlinked files they created in /tmp.

https://bugzilla.kernel.org/show_bug.cgi?id=16296

Requested-by: Matthias Clasen <mclasen@redhat.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
fs/notify/inotify/inotify_fsnotify.c
fs/notify/inotify/inotify_user.c
include/linux/fsnotify_backend.h
include/linux/inotify.h