• Amir Goldstein's avatar
    fanotify: report parent fid + name + child fid · 7e8283af
    Amir Goldstein authored
    For a group with fanotify_init() flag FAN_REPORT_DFID_NAME, the parent
    fid and name are reported for events on non-directory objects with an
    info record of type FAN_EVENT_INFO_TYPE_DFID_NAME.
    
    If the group also has the init flag FAN_REPORT_FID, the child fid
    is also reported with another info record that follows the first info
    record. The second info record is the same info record that would have
    been reported to a group with only FAN_REPORT_FID flag.
    
    When the child fid needs to be recorded, the variable size struct
    fanotify_name_event is preallocated with enough space to store the
    child fh between the dir fh and the name.
    
    Link: https://lore.kernel.org/r/20200716084230.30611-22-amir73il@gmail.comSigned-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
    Signed-off-by: default avatarJan Kara <jack@suse.cz>
    7e8283af
fanotify.c 22.3 KB