summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-04-29 17:53:28 +0200
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-05-09 22:28:36 +0200
commit7e0a126519b82648b254afcd95a168c15f65ea40 (patch)
tree7848ec4f08bb1c2a0effddb4ffa12a978cfe0e1f /fs
parentmm: Convert swap_readpage to call read_folio instead of readpage (diff)
downloadlinux-7e0a126519b82648b254afcd95a168c15f65ea40.tar.xz
linux-7e0a126519b82648b254afcd95a168c15f65ea40.zip
mm,fs: Remove aops->readpage
With all implementations of aops->readpage converted to aops->read_folio, we can stop checking whether it's set and remove the member from aops. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/file.c2
-rw-r--r--fs/buffer.c5
-rw-r--r--fs/ceph/addr.c2
3 files changed, 3 insertions, 6 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 373df5ebaf8d..57fba5abb059 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -2402,7 +2402,7 @@ static int btrfs_file_mmap(struct file *filp, struct vm_area_struct *vma)
{
struct address_space *mapping = filp->f_mapping;
- if (!mapping->a_ops->readpage && !mapping->a_ops->read_folio)
+ if (!mapping->a_ops->read_folio)
return -ENOEXEC;
file_accessed(filp);
diff --git a/fs/buffer.c b/fs/buffer.c
index ec0c52c8848e..786ef5b98c80 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -2827,10 +2827,7 @@ int nobh_truncate_page(struct address_space *mapping,
/* Ok, it's mapped. Make sure it's up-to-date */
if (!folio_test_uptodate(folio)) {
- if (mapping->a_ops->read_folio)
- err = mapping->a_ops->read_folio(NULL, folio);
- else
- err = mapping->a_ops->readpage(NULL, &folio->page);
+ err = mapping->a_ops->read_folio(NULL, folio);
if (err) {
folio_put(folio);
goto out;
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index be3e47784f08..e040b92bb17c 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -1772,7 +1772,7 @@ int ceph_mmap(struct file *file, struct vm_area_struct *vma)
{
struct address_space *mapping = file->f_mapping;
- if (!mapping->a_ops->readpage && !mapping->a_ops->read_folio)
+ if (!mapping->a_ops->read_folio)
return -ENOEXEC;
file_accessed(file);
vma->vm_ops = &ceph_vmops;