isofs: Convert symlinks and zisofs 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: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
parent cc14d240
...@@ -296,8 +296,9 @@ static int zisofs_fill_pages(struct inode *inode, int full_page, int pcount, ...@@ -296,8 +296,9 @@ static int zisofs_fill_pages(struct inode *inode, int full_page, int pcount,
* per reference. We inject the additional pages into the page * per reference. We inject the additional pages into the page
* cache as a form of readahead. * cache as a form of readahead.
*/ */
static int zisofs_readpage(struct file *file, struct page *page) static int zisofs_read_folio(struct file *file, struct folio *folio)
{ {
struct page *page = &folio->page;
struct inode *inode = file_inode(file); struct inode *inode = file_inode(file);
struct address_space *mapping = inode->i_mapping; struct address_space *mapping = inode->i_mapping;
int err; int err;
...@@ -369,7 +370,7 @@ static int zisofs_readpage(struct file *file, struct page *page) ...@@ -369,7 +370,7 @@ static int zisofs_readpage(struct file *file, struct page *page)
} }
const struct address_space_operations zisofs_aops = { const struct address_space_operations zisofs_aops = {
.readpage = zisofs_readpage, .read_folio = zisofs_read_folio,
/* No bmap operation supported */ /* No bmap operation supported */
}; };
......
...@@ -687,11 +687,12 @@ int parse_rock_ridge_inode(struct iso_directory_record *de, struct inode *inode, ...@@ -687,11 +687,12 @@ int parse_rock_ridge_inode(struct iso_directory_record *de, struct inode *inode,
} }
/* /*
* readpage() for symlinks: reads symlink contents into the page and either * read_folio() for symlinks: reads symlink contents into the folio and either
* makes it uptodate and returns 0 or returns error (-EIO) * makes it uptodate and returns 0 or returns error (-EIO)
*/ */
static int rock_ridge_symlink_readpage(struct file *file, struct page *page) static int rock_ridge_symlink_read_folio(struct file *file, struct folio *folio)
{ {
struct page *page = &folio->page;
struct inode *inode = page->mapping->host; struct inode *inode = page->mapping->host;
struct iso_inode_info *ei = ISOFS_I(inode); struct iso_inode_info *ei = ISOFS_I(inode);
struct isofs_sb_info *sbi = ISOFS_SB(inode->i_sb); struct isofs_sb_info *sbi = ISOFS_SB(inode->i_sb);
...@@ -804,5 +805,5 @@ static int rock_ridge_symlink_readpage(struct file *file, struct page *page) ...@@ -804,5 +805,5 @@ static int rock_ridge_symlink_readpage(struct file *file, struct page *page)
} }
const struct address_space_operations isofs_symlink_aops = { const struct address_space_operations isofs_symlink_aops = {
.readpage = rock_ridge_symlink_readpage .read_folio = rock_ridge_symlink_read_folio
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment