]> git.baikalelectronics.ru Git - kernel.git/commit
fanotify: ignore events on directories unless specifically requested
authorEric Paris <eparis@redhat.com>
Thu, 28 Oct 2010 21:21:59 +0000 (17:21 -0400)
committerEric Paris <eparis@redhat.com>
Thu, 28 Oct 2010 21:22:16 +0000 (17:22 -0400)
commit39e5555fd30142e00272e96af4316d918c3138a7
tree9ef20b7c3ee0a4130d88922d7d4115beaa0c9dc0
parenta770fcceb05df42d8d5187ce571e939a62d0eea5
fanotify: ignore events on directories unless specifically requested

fanotify has a very limited number of events it sends on directories.  The
usefulness of these events is yet to be seen and still we send them.  This
is particularly painful for mount marks where one might receive many of
these useless events.  As such this patch will drop events on IS_DIR()
inodes unless they were explictly requested with FAN_ON_DIR.

This means that a mark on a directory without FAN_EVENT_ON_CHILD or
FAN_ON_DIR is meaningless and will result in no events ever (although it
will still be allowed since detecting it is hard)

Signed-off-by: Eric Paris <eparis@redhat.com>
fs/notify/fanotify/fanotify.c
fs/notify/fanotify/fanotify_user.c
include/linux/fanotify.h