Re: [PATCH v3 07/13] fanotify: copy event fid info to user

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux