vboxsf: Convert vboxsf to read_folio

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>
This commit is contained in:
Matthew Wilcox (Oracle) 2022-04-29 11:12:16 -04:00
parent 0c698cc5e6
commit 4b4db9b4c7
1 changed files with 3 additions and 2 deletions

View File

@ -225,8 +225,9 @@ const struct inode_operations vboxsf_reg_iops = {
.setattr = vboxsf_setattr .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; struct vboxsf_handle *sf_handle = file->private_data;
loff_t off = page_offset(page); loff_t off = page_offset(page);
u32 nread = PAGE_SIZE; u32 nread = PAGE_SIZE;
@ -352,7 +353,7 @@ out:
* page and it does not call SetPageUptodate for partial writes. * page and it does not call SetPageUptodate for partial writes.
*/ */
const struct address_space_operations vboxsf_reg_aops = { const struct address_space_operations vboxsf_reg_aops = {
.readpage = vboxsf_readpage, .read_folio = vboxsf_read_folio,
.writepage = vboxsf_writepage, .writepage = vboxsf_writepage,
.dirty_folio = filemap_dirty_folio, .dirty_folio = filemap_dirty_folio,
.write_begin = simple_write_begin, .write_begin = simple_write_begin,