affs: Convert affs to read_folio
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 9 May 2022 20:21:44 +0000 (16:21 -0400)
This is a "weak" conversion which converts straight back to using pages.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
fs/affs/file.c
fs/affs/symlink.c

index 5da562c..cd00a4c 100644 (file)
@@ -629,8 +629,9 @@ out:
 }
 
 static int
-affs_readpage_ofs(struct file *file, struct page *page)
+affs_read_folio_ofs(struct file *file, struct folio *folio)
 {
+       struct page *page = &folio->page;
        struct inode *inode = page->mapping->host;
        u32 to;
        int err;
@@ -837,7 +838,7 @@ err_bh:
 const struct address_space_operations affs_aops_ofs = {
        .dirty_folio    = block_dirty_folio,
        .invalidate_folio = block_invalidate_folio,
-       .readpage = affs_readpage_ofs,
+       .read_folio = affs_read_folio_ofs,
        //.writepage = affs_writepage_ofs,
        .write_begin = affs_write_begin_ofs,
        .write_end = affs_write_end_ofs
index a7531b2..31d6446 100644 (file)
@@ -11,8 +11,9 @@
 
 #include "affs.h"
 
-static int affs_symlink_readpage(struct file *file, struct page *page)
+static int affs_symlink_read_folio(struct file *file, struct folio *folio)
 {
+       struct page *page = &folio->page;
        struct buffer_head *bh;
        struct inode *inode = page->mapping->host;
        char *link = page_address(page);
@@ -67,7 +68,7 @@ fail:
 }
 
 const struct address_space_operations affs_symlink_aops = {
-       .readpage       = affs_symlink_readpage,
+       .read_folio     = affs_symlink_read_folio,
 };
 
 const struct inode_operations affs_symlink_inode_operations = {