linux/fs/notify/fanotify
Amir Goldstein 83b535d289 fanotify: support events with data type FSNOTIFY_EVENT_INODE
When event data type is FSNOTIFY_EVENT_INODE, we don't have a refernece
to the mount, so we will not be able to open a file descriptor when user
reads the event. However, if the listener has enabled reporting file
identifier with the FAN_REPORT_FID init flag, we allow reporting those
events and we use an identifier inode to encode fid.

The inode to use as identifier when reporting fid depends on the event.
For dirent modification events, we report the modified directory inode
and we report the "victim" inode otherwise.
For example:
FS_ATTRIB reports the child inode even if reported on a watched parent.
FS_CREATE reports the modified dir inode and not the created inode.

[JK: Fixup condition in fanotify_group_event_mask()]

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
2019-02-07 16:38:36 +01:00
..
fanotify_user.c fanotify: support events with data type FSNOTIFY_EVENT_INODE 2019-02-07 16:38:36 +01:00
fanotify.c fanotify: support events with data type FSNOTIFY_EVENT_INODE 2019-02-07 16:38:36 +01:00
fanotify.h fanotify: support events with data type FSNOTIFY_EVENT_INODE 2019-02-07 16:38:36 +01:00
Kconfig treewide: Fix typos in Kconfig 2017-10-12 15:42:00 +02:00
Makefile fanotify: fanotify_init syscall declaration 2010-07-28 09:58:55 -04:00