f2fs: Convert f2fs 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:45 +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/f2fs/data.c

index b3cf491..f894267 100644 (file)
@@ -2372,8 +2372,9 @@ next_page:
        return ret;
 }
 
-static int f2fs_read_data_page(struct file *file, struct page *page)
+static int f2fs_read_data_folio(struct file *file, struct folio *folio)
 {
+       struct page *page = &folio->page;
        struct inode *inode = page_file_mapping(page)->host;
        int ret = -EAGAIN;
 
@@ -3935,7 +3936,7 @@ static void f2fs_swap_deactivate(struct file *file)
 #endif
 
 const struct address_space_operations f2fs_dblock_aops = {
-       .readpage       = f2fs_read_data_page,
+       .read_folio     = f2fs_read_data_folio,
        .readahead      = f2fs_readahead,
        .writepage      = f2fs_write_data_page,
        .writepages     = f2fs_write_data_pages,