提交 073a55a0 编写于 作者: J Jan Kara 提交者: Xie XiuQi

fs: Export generic_fadvise()

mainline inclusion
from mainline-5.4-rc1
commit cf1ea059
category: bugfix
bugzilla: 22583
CVE: NA

---------------------------

Filesystems will need to call this function from their fadvise handlers.

CC: stable@vger.kernel.org
Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: NJan Kara <jack@suse.cz>
Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Nyu kuai <yukuai3@huawei.com>
Reviewed-by: NHou Tao <houtao1@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 732751fc
......@@ -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 */
......@@ -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)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册