]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
vboxsf: Convert vboxsf 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:46 +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/vboxsf/file.c

index d74e0d336995d48131c96ff5b8e251783246e42a..572aa1c43b37b9a9c47e967a8709fbe8adeba723 100644 (file)
@@ -225,8 +225,9 @@ const struct inode_operations vboxsf_reg_iops = {
        .setattr = vboxsf_setattr
 };
 
-static int vboxsf_readpage(struct file *file, struct page *page)
+static int vboxsf_read_folio(struct file *file, struct folio *folio)
 {
+       struct page *page = &folio->page;
        struct vboxsf_handle *sf_handle = file->private_data;
        loff_t off = page_offset(page);
        u32 nread = PAGE_SIZE;
@@ -352,7 +353,7 @@ out:
  * page and it does not call SetPageUptodate for partial writes.
  */
 const struct address_space_operations vboxsf_reg_aops = {
-       .readpage = vboxsf_readpage,
+       .read_folio = vboxsf_read_folio,
        .writepage = vboxsf_writepage,
        .dirty_folio = filemap_dirty_folio,
        .write_begin = simple_write_begin,