From 080d4caf553c99b4ca8e7ea9346e8136e3b46197 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 8 Jun 2022 12:54:11 +0200 Subject: [PATCH] ANDROID: incremental-fs: convert to read_folio This is a "weak" conversion which converts straight back to using pages to keep the build working properly. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Fixes: 7e0a126519b8 ("mm,fs: Remove aops->readpage") CC: Paul Lawrence Signed-off-by: Greg Kroah-Hartman Change-Id: Id34db2c71743731d6a69b7b566a1f3a0a12dffe1 --- fs/incfs/vfs.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fs/incfs/vfs.c b/fs/incfs/vfs.c index fe5a104ac806..0ac6a1674cf1 100644 --- a/fs/incfs/vfs.c +++ b/fs/incfs/vfs.c @@ -48,7 +48,7 @@ static int dir_rename(struct inode *old_dir, struct dentry *old_dentry, static int file_open(struct inode *inode, struct file *file); static int file_release(struct inode *inode, struct file *file); -static int read_single_page(struct file *f, struct page *page); +static int read_folio(struct file *f, struct folio *folio); static long dispatch_ioctl(struct file *f, unsigned int req, unsigned long arg); #ifdef CONFIG_COMPAT @@ -114,7 +114,7 @@ static const struct dentry_operations incfs_dentry_ops = { }; static const struct address_space_operations incfs_address_space_ops = { - .readpage = read_single_page, + .read_folio = read_folio, /* .readpages = readpages */ }; @@ -136,7 +136,7 @@ static int incfs_file_mmap(struct file *file, struct vm_area_struct *vma) { struct address_space *mapping = file->f_mapping; - if (!mapping->a_ops->readpage) + if (!mapping->a_ops->read_folio) return -ENOEXEC; file_accessed(file); vma->vm_ops = &incfs_file_vm_ops; @@ -518,8 +518,9 @@ static int read_single_page_timeouts(struct data_file *df, struct file *f, &timeouts); } -static int read_single_page(struct file *f, struct page *page) +static int read_folio(struct file *f, struct folio *folio) { + struct page *page = &folio->page; loff_t offset = 0; loff_t size = 0; ssize_t bytes_to_read = 0;