From 073a55a031aa82bd3c0cde452ba6cc2b59074464 Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Wed, 30 Oct 2019 21:50:43 +0800 Subject: [PATCH] fs: Export generic_fadvise() mainline inclusion from mainline-5.4-rc1 commit cf1ea0592dbf109e7e7935b7d5b1a47a1ba04174 category: bugfix bugzilla: 22583 CVE: NA --------------------------- 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: yu kuai Reviewed-by: Hou Tao Signed-off-by: Yang Yingliang --- include/linux/fs.h | 2 ++ mm/fadvise.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index 3c659015d2c8..0d9a2e201f1c 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -3516,5 +3516,7 @@ 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); +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 467bcd032037..57f36c0943f9 100644 --- a/mm/fadvise.c +++ b/mm/fadvise.c @@ -27,7 +27,7 @@ * deactivate the pages and clear PG_Referenced. */ -static int generic_fadvise(struct file *file, loff_t offset, loff_t len, +int generic_fadvise(struct file *file, loff_t offset, loff_t len, int advice) { struct inode *inode; @@ -178,6 +178,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) { -- GitLab