mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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>
This commit is contained in:
parent
17ef445f9b
commit
45cd0faae3
3 changed files with 53 additions and 33 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue