mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-09 23:39:18 +00:00
erofs: Convert erofs zdata 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:
parent
356d9fbb09
commit
a2e20a25a1
@ -791,7 +791,7 @@ err_out:
|
|||||||
static bool z_erofs_get_sync_decompress_policy(struct erofs_sb_info *sbi,
|
static bool z_erofs_get_sync_decompress_policy(struct erofs_sb_info *sbi,
|
||||||
unsigned int readahead_pages)
|
unsigned int readahead_pages)
|
||||||
{
|
{
|
||||||
/* auto: enable for readpage, disable for readahead */
|
/* auto: enable for read_folio, disable for readahead */
|
||||||
if ((sbi->opt.sync_decompress == EROFS_SYNC_DECOMPRESS_AUTO) &&
|
if ((sbi->opt.sync_decompress == EROFS_SYNC_DECOMPRESS_AUTO) &&
|
||||||
!readahead_pages)
|
!readahead_pages)
|
||||||
return true;
|
return true;
|
||||||
@ -1488,8 +1488,9 @@ skip:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int z_erofs_readpage(struct file *file, struct page *page)
|
static int z_erofs_read_folio(struct file *file, struct folio *folio)
|
||||||
{
|
{
|
||||||
|
struct page *page = &folio->page;
|
||||||
struct inode *const inode = page->mapping->host;
|
struct inode *const inode = page->mapping->host;
|
||||||
struct erofs_sb_info *const sbi = EROFS_I_SB(inode);
|
struct erofs_sb_info *const sbi = EROFS_I_SB(inode);
|
||||||
struct z_erofs_decompress_frontend f = DECOMPRESS_FRONTEND_INIT(inode);
|
struct z_erofs_decompress_frontend f = DECOMPRESS_FRONTEND_INIT(inode);
|
||||||
@ -1563,6 +1564,6 @@ static void z_erofs_readahead(struct readahead_control *rac)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const struct address_space_operations z_erofs_aops = {
|
const struct address_space_operations z_erofs_aops = {
|
||||||
.readpage = z_erofs_readpage,
|
.read_folio = z_erofs_read_folio,
|
||||||
.readahead = z_erofs_readahead,
|
.readahead = z_erofs_readahead,
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user