fsnotify: generate pre-content permission event on page fault
authorJosef Bacik <josef@toxicpanda.com>
Fri, 15 Nov 2024 15:30:29 +0000 (10:30 -0500)
committerJan Kara <jack@suse.cz>
Wed, 11 Dec 2024 16:28:41 +0000 (17:28 +0100)
commit8392bc2ff8c8bf7c4c5e6dfa71ccd893a3c046f6
tree4d0ad92f307895589ef8e428dc0c4f9a587679d3
parent20bf82a898b65c129af76deb96a1b415d3098a28
fsnotify: generate pre-content permission event on page fault

FS_PRE_ACCESS will be generated on page fault depending on the faulting
method. This pre-content event is meant to be used by hierarchical storage
managers that want to fill in the file content on first read access.

Export a simple helper that file systems that have their own ->fault()
will use, and have a more complicated helper to be do fancy things in
filemap_fault.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/aa56c50ce81b1fd18d7f5d71dd2dfced5eba9687.1731684329.git.josef@toxicpanda.com
include/linux/mm.h
mm/filemap.c
mm/nommu.c