]> www.infradead.org Git - users/willy/pagecache.git/commitdiff
hostfs: Convert hostfs 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/hostfs/hostfs_kern.c

index e658d8edde35284763cc3671602d9d8248dc8fee..cc1bc6f93a0101b6e1be37f9abf82c6cbf714af2 100644 (file)
@@ -434,8 +434,9 @@ static int hostfs_writepage(struct page *page, struct writeback_control *wbc)
        return err;
 }
 
-static int hostfs_readpage(struct file *file, struct page *page)
+static int hostfs_read_folio(struct file *file, struct folio *folio)
 {
+       struct page *page = &folio->page;
        char *buffer;
        loff_t start = page_offset(page);
        int bytes_read, ret = 0;
@@ -504,7 +505,7 @@ static int hostfs_write_end(struct file *file, struct address_space *mapping,
 
 static const struct address_space_operations hostfs_aops = {
        .writepage      = hostfs_writepage,
-       .readpage       = hostfs_readpage,
+       .read_folio     = hostfs_read_folio,
        .dirty_folio    = filemap_dirty_folio,
        .write_begin    = hostfs_write_begin,
        .write_end      = hostfs_write_end,