udf: Convert adinicb and symlinks 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 0b7bf4830a
commit 0c698cc5e6
2 changed files with 8 additions and 7 deletions

View File

@ -57,11 +57,11 @@ static void __udf_adinicb_readpage(struct page *page)
kunmap_atomic(kaddr);
}
static int udf_adinicb_readpage(struct file *file, struct page *page)
static int udf_adinicb_read_folio(struct file *file, struct folio *folio)
{
BUG_ON(!PageLocked(page));
__udf_adinicb_readpage(page);
unlock_page(page);
BUG_ON(!folio_test_locked(folio));
__udf_adinicb_readpage(&folio->page);
folio_unlock(folio);
return 0;
}
@ -127,7 +127,7 @@ static int udf_adinicb_write_end(struct file *file, struct address_space *mappin
const struct address_space_operations udf_adinicb_aops = {
.dirty_folio = block_dirty_folio,
.invalidate_folio = block_invalidate_folio,
.readpage = udf_adinicb_readpage,
.read_folio = udf_adinicb_read_folio,
.writepage = udf_adinicb_writepage,
.write_begin = udf_adinicb_write_begin,
.write_end = udf_adinicb_write_end,

View File

@ -101,8 +101,9 @@ static int udf_pc_to_char(struct super_block *sb, unsigned char *from,
return 0;
}
static int udf_symlink_filler(struct file *file, struct page *page)
static int udf_symlink_filler(struct file *file, struct folio *folio)
{
struct page *page = &folio->page;
struct inode *inode = page->mapping->host;
struct buffer_head *bh = NULL;
unsigned char *symlink;
@ -183,7 +184,7 @@ static int udf_symlink_getattr(struct user_namespace *mnt_userns,
* symlinks can't do much...
*/
const struct address_space_operations udf_symlink_aops = {
.readpage = udf_symlink_filler,
.read_folio = udf_symlink_filler,
};
const struct inode_operations udf_symlink_inode_operations = {