diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-04-29 11:47:39 -0400 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-05-09 16:21:44 -0400 |
commit | f132ab7d3ab03c5bae28d31fb80ba77c4da05500 (patch) | |
tree | 7cab6d4b85214c1fcfc19079ea9be980b51e8b31 /fs/ntfs3 | |
parent | 2c69e2057962b6bd76d72446453862eb59325b49 (diff) | |
download | linux-stable-f132ab7d3ab03c5bae28d31fb80ba77c4da05500.tar.gz linux-stable-f132ab7d3ab03c5bae28d31fb80ba77c4da05500.tar.bz2 linux-stable-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/ntfs3')
-rw-r--r-- | fs/ntfs3/inode.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c index bfd71f384e21..74f60c457f28 100644 --- a/fs/ntfs3/inode.c +++ b/fs/ntfs3/inode.c @@ -676,8 +676,9 @@ static sector_t ntfs_bmap(struct address_space *mapping, sector_t block) return generic_block_bmap(mapping, block, ntfs_get_block_bmap); } -static int ntfs_readpage(struct file *file, struct page *page) +static int ntfs_read_folio(struct file *file, struct folio *folio) { + struct page *page = &folio->page; int err; struct address_space *mapping = page->mapping; struct inode *inode = mapping->host; @@ -701,7 +702,7 @@ static int ntfs_readpage(struct file *file, struct page *page) } /* Normal + sparse files. */ - return mpage_readpage(page, ntfs_get_block); + return mpage_read_folio(folio, ntfs_get_block); } static void ntfs_readahead(struct readahead_control *rac) @@ -1940,7 +1941,7 @@ const struct inode_operations ntfs_link_inode_operations = { }; const struct address_space_operations ntfs_aops = { - .readpage = ntfs_readpage, + .read_folio = ntfs_read_folio, .readahead = ntfs_readahead, .writepage = ntfs_writepage, .writepages = ntfs_writepages, @@ -1952,7 +1953,7 @@ const struct address_space_operations ntfs_aops = { }; const struct address_space_operations ntfs_aops_cmpr = { - .readpage = ntfs_readpage, + .read_folio = ntfs_read_folio, .readahead = ntfs_readahead, }; // clang-format on |