diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-04-29 17:47:39 +0200 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-05-09 22:21:44 +0200 |
commit | f132ab7d3ab03c5bae28d31fb80ba77c4da05500 (patch) | |
tree | 7cab6d4b85214c1fcfc19079ea9be980b51e8b31 /fs/mpage.c | |
parent | fs: Convert block_read_full_page() to block_read_full_folio() (diff) | |
download | linux-f132ab7d3ab03c5bae28d31fb80ba77c4da05500.tar.xz linux-f132ab7d3ab03c5bae28d31fb80ba77c4da05500.zip |
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.c | 8 |
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. |