From 00451d5262ac074d1cd937c8cbaede99e3022c34 Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Thu, 29 Aug 2019 09:04:11 -0700 Subject: [PATCH 0420/2944] fs: Export generic_fadvise() commit cf1ea0592dbf109e7e7935b7d5b1a47a1ba04174 upstream. Filesystems will need to call this function from their fadvise handlers. CC: stable@vger.kernel.org Reviewed-by: Darrick J. Wong Signed-off-by: Jan Kara Signed-off-by: Darrick J. Wong Signed-off-by: Joseph Qi Reviewed-by: Xiaoguang Wang --- include/linux/fs.h | 2 ++ mm/fadvise.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index 97b1e95..73358d7 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -3495,5 +3495,7 @@ static inline bool dir_relax_shared(struct inode *inode) /* mm/fadvise.c */ extern int vfs_fadvise(struct file *file, loff_t offset, loff_t len, int advice); +extern int generic_fadvise(struct file *file, loff_t offset, loff_t len, + int advice); #endif /* _LINUX_FS_H */ diff --git a/mm/fadvise.c b/mm/fadvise.c index 467bcd0..4f17c83 100644 --- a/mm/fadvise.c +++ b/mm/fadvise.c @@ -27,8 +27,7 @@ * deactivate the pages and clear PG_Referenced. */ -static int generic_fadvise(struct file *file, loff_t offset, loff_t len, - int advice) +int generic_fadvise(struct file *file, loff_t offset, loff_t len, int advice) { struct inode *inode; struct address_space *mapping; @@ -178,6 +177,7 @@ static int generic_fadvise(struct file *file, loff_t offset, loff_t len, } return 0; } +EXPORT_SYMBOL(generic_fadvise); int vfs_fadvise(struct file *file, loff_t offset, loff_t len, int advice) { -- 1.8.3.1