mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Linux 5.19 compat: aops->read_folio()
As of the Linux 5.19 kernel the readpage() address space operation has been replaced by read_folio(). Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #13515
This commit is contained in:
@@ -635,11 +635,19 @@ zpl_readpage_common(struct page *pp)
|
||||
return (error);
|
||||
}
|
||||
|
||||
#ifdef HAVE_VFS_READ_FOLIO
|
||||
static int
|
||||
zpl_read_folio(struct file *filp, struct folio *folio)
|
||||
{
|
||||
return (zpl_readpage_common(&folio->page));
|
||||
}
|
||||
#else
|
||||
static int
|
||||
zpl_readpage(struct file *filp, struct page *pp)
|
||||
{
|
||||
return (zpl_readpage_common(pp));
|
||||
}
|
||||
#endif
|
||||
|
||||
static int
|
||||
zpl_readpage_filler(void *data, struct page *pp)
|
||||
@@ -1057,7 +1065,11 @@ const struct address_space_operations zpl_address_space_operations = {
|
||||
#else
|
||||
.readahead = zpl_readahead,
|
||||
#endif
|
||||
#ifdef HAVE_VFS_READ_FOLIO
|
||||
.read_folio = zpl_read_folio,
|
||||
#else
|
||||
.readpage = zpl_readpage,
|
||||
#endif
|
||||
.writepage = zpl_writepage,
|
||||
.writepages = zpl_writepages,
|
||||
.direct_IO = zpl_direct_IO,
|
||||
|
||||
Reference in New Issue
Block a user