fanotify: report parent fid + child fid
authorAmir Goldstein <amir73il@gmail.com>
Thu, 16 Jul 2020 08:42:30 +0000 (11:42 +0300)
committerJan Kara <jack@suse.cz>
Mon, 27 Jul 2020 21:24:01 +0000 (23:24 +0200)
commit691d976352c73f9b55486092625adbcedd5ca5c5
tree327ad0a044a0587b38ba9c31a2d1de40b6dcc831
parent7e8283af6edeb7dd9f8f18a429e6738c07f00ce4
fanotify: report parent fid + child fid

Add support for FAN_REPORT_FID | FAN_REPORT_DIR_FID.
Internally, it is implemented as a private case of reporting both
parent and child fids and name, the parent and child fids are recorded
in a variable length fanotify_name_event, but there is no name.

It should be noted that directory modification events are recorded
in fixed size fanotify_fid_event when not reporting name, just like
with group flags FAN_REPORT_FID.

Link: https://lore.kernel.org/r/20200716084230.30611-23-amir73il@gmail.com
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/notify/fanotify/fanotify.c
fs/notify/fanotify/fanotify_user.c