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:

committed by
Miklos Szeredi

parent
17ef445f9b
commit
45cd0faae3
@@ -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 */
|
||||
|
Reference in New Issue
Block a user