summaryrefslogtreecommitdiffstats
path: root/fs/mpage.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-04-29 11:47:39 -0400
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-05-09 16:21:44 -0400
commitf132ab7d3ab03c5bae28d31fb80ba77c4da05500 (patch)
tree7cab6d4b85214c1fcfc19079ea9be980b51e8b31 /fs/mpage.c
parent2c69e2057962b6bd76d72446453862eb59325b49 (diff)
downloadlinux-f132ab7d3ab03c5bae28d31fb80ba77c4da05500.tar.bz2
fs: Convert mpage_readpage to mpage_read_folio
mpage_readpage still works in terms of pages, and has not been audited for correctness with large folios, so include an assertion that the filesystem is not passing it large folios. Convert all the filesystems to call mpage_read_folio() instead of mpage_readpage(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'fs/mpage.c')
-rw-r--r--fs/mpage.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/mpage.c b/fs/mpage.c
index a04439b84ae2..6df9c3aa5728 100644
--- a/fs/mpage.c
+++ b/fs/mpage.c
@@ -364,20 +364,22 @@ EXPORT_SYMBOL(mpage_readahead);
/*
* This isn't called much at all
*/
-int mpage_readpage(struct page *page, get_block_t get_block)
+int mpage_read_folio(struct folio *folio, get_block_t get_block)
{
struct mpage_readpage_args args = {
- .page = page,
+ .page = &folio->page,
.nr_pages = 1,
.get_block = get_block,
};
+ VM_BUG_ON_FOLIO(folio_test_large(folio), folio);
+
args.bio = do_mpage_readpage(&args);
if (args.bio)
mpage_bio_submit(args.bio);
return 0;
}
-EXPORT_SYMBOL(mpage_readpage);
+EXPORT_SYMBOL(mpage_read_folio);
/*
* Writing is not so simple.