summaryrefslogtreecommitdiff
path: root/fs/buffer.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-04-29 08:43:23 -0400
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-05-09 16:21:40 -0400
commit5efe7448a1426250b5747c10ad438517f44f1e51 (patch)
treeafe256df7b4de7af6d60304322efa36813f2016c /fs/buffer.c
parent6c2ae0d5db57d772a11f2d7399da5e22f94767d6 (diff)
downloadlinux-rpi-5efe7448a1426250b5747c10ad438517f44f1e51.tar.gz
linux-rpi-5efe7448a1426250b5747c10ad438517f44f1e51.tar.bz2
linux-rpi-5efe7448a1426250b5747c10ad438517f44f1e51.zip
fs: Introduce aops->read_folio
Change all the callers of ->readpage to call ->read_folio in preference, if it exists. This is a transitional duplication, and will be removed by the end of the series. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'fs/buffer.c')
-rw-r--r--fs/buffer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 9737e0dbe3ec..225d03cd622d 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -2824,7 +2824,10 @@ int nobh_truncate_page(struct address_space *mapping,
/* Ok, it's mapped. Make sure it's up-to-date */
if (!folio_test_uptodate(folio)) {
- err = mapping->a_ops->readpage(NULL, &folio->page);
+ if (mapping->a_ops->read_folio)
+ err = mapping->a_ops->read_folio(NULL, folio);
+ else
+ err = mapping->a_ops->readpage(NULL, &folio->page);
if (err) {
folio_put(folio);
goto out;