Re: [PATCH v2 03/16] fsnotify: generate pre-content permission event on open

Christian Brauner
2024-08-09T11:51:27Z

On Thu, Aug 08, 2024 at 03:27:05PM GMT, Josef Bacik wrote:
> From: Amir Goldstein <amir73il@gmail.com>
>
> FS_PRE_ACCESS or FS_PRE_MODIFY will be generated on open depending on
> file open mode. The pre-content event will be generated in addition to
> FS_OPEN_PERM, but without sb_writers held and after file was truncated
> in case file was opened with O_CREAT and/or O_TRUNC.
>
> The event will have a range info of (0..0) to provide an opportunity
> to fill entire file content on open.
>
> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> ---

More magic hooks in that code...

Reviewed-by: Christian Brauner <brauner@kernel.org>