summaryrefslogtreecommitdiff
path: root/fs/notify/inotify/inotify_user.c
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2010-07-28 14:18:37 (GMT)
committerEric Paris <eparis@redhat.com>2010-07-28 14:18:49 (GMT)
commit8c1934c8d70b22ca8333b216aec6c7d09fdbd6a6 (patch)
tree25fffb46e0b1594aa692ed10e755b6ae041022bc /fs/notify/inotify/inotify_user.c
parent611da04f7a31b2208e838be55a42c7a1310ae321 (diff)
downloadlinux-8c1934c8d70b22ca8333b216aec6c7d09fdbd6a6.tar.xz
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>
Diffstat (limited to 'fs/notify/inotify/inotify_user.c')
-rw-r--r--fs/notify/inotify/inotify_user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c
index f381daf..dfc80f7 100644
--- a/fs/notify/inotify/inotify_user.c
+++ b/fs/notify/inotify/inotify_user.c
@@ -97,7 +97,7 @@ static inline __u32 inotify_arg_to_mask(u32 arg)
mask = (FS_IN_IGNORED | FS_EVENT_ON_CHILD | FS_UNMOUNT);
/* mask off the flags used to open the fd */
- mask |= (arg & (IN_ALL_EVENTS | IN_ONESHOT));
+ mask |= (arg & (IN_ALL_EVENTS | IN_ONESHOT | IN_EXCL_UNLINK));
return mask;
}