diff options
author | Amir Goldstein <amir73il@gmail.com> | 2018-08-27 15:56:02 +0300 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2018-08-30 17:08:35 +0200 |
commit | 45cd0faae3715e305bc46e23b34c5ed4d185ceb8 (patch) | |
tree | be01e26c488ebd3cb7943136a0805563e311d117 /include | |
parent | 17ef445f9befdc5c9adac270b18240ad24ee50ec (diff) | |
download | linux-45cd0faae3715e305bc46e23b34c5ed4d185ceb8.tar.bz2 |
vfs: add the fadvise() file operation
This is going to be used by overlayfs and possibly useful
for other filesystems.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fs.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 33322702c910..6c0b4a1c22ff 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1763,6 +1763,7 @@ struct file_operations { u64); int (*dedupe_file_range)(struct file *, loff_t, struct file *, loff_t, u64); + int (*fadvise)(struct file *, loff_t, loff_t, int); } __randomize_layout; struct inode_operations { @@ -3459,4 +3460,8 @@ static inline bool dir_relax_shared(struct inode *inode) extern bool path_noexec(const struct path *path); extern void inode_nohighmem(struct inode *inode); +/* mm/fadvise.c */ +extern int vfs_fadvise(struct file *file, loff_t offset, loff_t len, + int advice); + #endif /* _LINUX_FS_H */ |