diff options
| author | Amir Goldstein <amir73il@gmail.com> | 2024-11-15 10:30:21 -0500 |
|---|---|---|
| committer | Jan Kara <jack@suse.cz> | 2024-12-10 12:03:17 +0100 |
| commit | 9740d17162deca7138fad7dcf3ef52324832c32b (patch) | |
| tree | 00b752792ae6101ccd4079a4b7bb000d97493886 /include/linux/fsnotify.h | |
| parent | f156524e5d72c81792eee81f828784dc8a37a7f2 (diff) | |
| download | linux-9740d17162deca7138fad7dcf3ef52324832c32b.tar.gz linux-9740d17162deca7138fad7dcf3ef52324832c32b.zip | |
fsnotify: pass optional file access range in pre-content event
We would like to add file range information to pre-content events.
Pass a struct file_range with offset and length to event handler
along with pre-content permission event.
The offset and length are aligned to page size, but we may need to
align them to minimum folio size for filesystems with large block size.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/88eddee301231d814aede27fb4d5b41ae37c9702.1731684329.git.josef@toxicpanda.com
Diffstat (limited to 'include/linux/fsnotify.h')
| -rw-r--r-- | include/linux/fsnotify.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index d91aa064f0e4..87044acf8e79 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h @@ -154,7 +154,7 @@ static inline int fsnotify_file_area_perm(struct file *file, int perm_mask, * read()/write() and other types of access generate pre-content events. */ if (unlikely(FMODE_FSNOTIFY_HSM(file->f_mode))) { - int ret = fsnotify_path(&file->f_path, FS_PRE_ACCESS); + int ret = fsnotify_pre_content(&file->f_path, ppos, count); if (ret) return ret; @@ -171,7 +171,7 @@ static inline int fsnotify_file_area_perm(struct file *file, int perm_mask, } /* - * fsnotify_file_perm - permission hook before file access + * fsnotify_file_perm - permission hook before file access (unknown range) */ static inline int fsnotify_file_perm(struct file *file, int perm_mask) { |
