On Sun 25-11-18 15:43:46, Amir Goldstein wrote: > If group requested FAN_REPORT_FID and event has file identifier > copy that information to user reading the event after reading > event metadata. > metadata->event_len includes the length of the fid information. > > Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx> ... > +static int round_event_fid_len(struct fsnotify_event *fsn_event) > +{ > + struct fanotify_event *event = FANOTIFY_E(fsn_event); > + > + if (!FANOTIFY_HAS_FID(event)) > + return 0; > + > + return roundup(FANOTIFY_FID_INFO_LEN(event), FAN_EVENT_METADATA_LEN); > +} > + Why do you round up to FAN_EVENT_METADATA_LEN? I think rounding up to multiple of 8 bytes should be more than enough... Otherwise the patch looks good to me. Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR