summaryrefslogtreecommitdiffstats
path: root/kernel/events
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 /kernel/events
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 'kernel/events')
-rw-r--r--kernel/events/uprobes.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 2c7815d20038..a9bc3c98f76a 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -787,10 +787,10 @@ static int __copy_insn(struct address_space *mapping, struct file *filp,
struct page *page;
/*
* Ensure that the page that has the original instruction is populated
- * and in page-cache. If ->readpage == NULL it must be shmem_mapping(),
+ * and in page-cache. If ->read_folio == NULL it must be shmem_mapping(),
* see uprobe_register().
*/
- if (mapping->a_ops->read_folio || mapping->a_ops->readpage)
+ if (mapping->a_ops->read_folio)
page = read_mapping_page(mapping, offset >> PAGE_SHIFT, filp);
else
page = shmem_read_mapping_page(mapping, offset >> PAGE_SHIFT);
@@ -1144,7 +1144,6 @@ static int __uprobe_register(struct inode *inode, loff_t offset,
/* copy_insn() uses read_mapping_page() or shmem_read_mapping_page() */
if (!inode->i_mapping->a_ops->read_folio &&
- !inode->i_mapping->a_ops->readpage &&
!shmem_mapping(inode->i_mapping))
return -EIO;
/* Racy, just to catch the obvious mistakes */