# Re: \[PATCH v5 15/23\] fanotify: Require fid\_mode for any non-fd event

- From: Jan Kara \<jack@suse.cz\>
- Date: 2021-08-05 10:29:34 
- List: linux-ext4
- Page: https://ratatoskr.run/linux-ext4/2021/08/211687
- Thread: https://ratatoskr.run/linux-fsdevel/2021/08/211614/t.md

```text
On Wed 04-08-21 12:06:04, Gabriel Krisman Bertazi wrote:
> Like inode events, FAN_FS_ERROR will require fid mode.  Therefore,
> convert the verification during fanotify_mark(2) to require fid for any
> non-fd event.  This means fid_mode will not only be required for inode
> events, but for any event that doesn't provide a descriptor.
> 
> Suggested-by: Amir Goldstein <amir73il@gmail.com>
> Signed-off-by: Gabriel Krisman Bertazi <redacted>

Looks good. One style nit below, otherwise feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

 
>  	/*
> -	 * Events with data type inode do not carry enough information to report
> -	 * event->fd, so we do not allow setting a mask for inode events unless
> -	 * group supports reporting fid.
> -	 * inode events are not supported on a mount mark, because they do not
> -	 * carry enough information (i.e. path) to be filtered by mount point.
> -	 */
> +	* Events that do not carry enough information to report
> +	* event->fd require a group that supports reporting fid.  Those
> +	* events are not supported on a mount mark, because they do not
> +	* carry enough information (i.e. path) to be filtered by mount
> +	* point.
> +	*/
        ^ I think these should be one column more to the right to align
with the opening /*.

								Honza

-- 
Jan Kara [ref]
SUSE Labs, CR
```
