]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fanotify: introduce FAN_PRE_ACCESS permission event
authorAmir Goldstein <amir73il@gmail.com>
Fri, 15 Nov 2024 15:30:23 +0000 (10:30 -0500)
committerJan Kara <jack@suse.cz>
Tue, 10 Dec 2024 11:03:17 +0000 (12:03 +0100)
commit4f8afa33817a6420398d1c177c6e220a05081f51
tree520a26fbfb7eb32e99d69abadc5d6fe3a2a3020d
parent4acf3bc76e521b47acebcefc6312c97992f4ca29
fanotify: introduce FAN_PRE_ACCESS permission event

Similar to FAN_ACCESS_PERM permission event, but it is only allowed with
class FAN_CLASS_PRE_CONTENT and only allowed on regular files and dirs.

Unlike FAN_ACCESS_PERM, it is safe to write to the file being accessed
in the context of the event handler.

This pre-content event is meant to be used by hierarchical storage
managers that want to fill the content of files on first read access.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/b80986f8d5b860acea2c9a73c0acd93587be5fe4.1731684329.git.josef@toxicpanda.com
fs/notify/fanotify/fanotify.c
fs/notify/fanotify/fanotify_user.c
include/linux/fanotify.h
include/uapi/linux/fanotify.h