squashfs: Convert squashfs 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
f91dbd0222
commit
124cfc154f
|
@ -444,8 +444,9 @@ static int squashfs_readpage_sparse(struct page *page, int expected)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int squashfs_readpage(struct file *file, struct page *page)
|
||||
static int squashfs_read_folio(struct file *file, struct folio *folio)
|
||||
{
|
||||
struct page *page = &folio->page;
|
||||
struct inode *inode = page->mapping->host;
|
||||
struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info;
|
||||
int index = page->index >> (msblk->block_log - PAGE_SHIFT);
|
||||
|
@ -496,5 +497,5 @@ out:
|
|||
|
||||
|
||||
const struct address_space_operations squashfs_aops = {
|
||||
.readpage = squashfs_readpage
|
||||
.read_folio = squashfs_read_folio
|
||||
};
|
||||
|
|
|
@ -148,7 +148,7 @@ static int squashfs_fill_super(struct super_block *sb, struct fs_context *fc)
|
|||
|
||||
/*
|
||||
* squashfs provides 'backing_dev_info' in order to disable read-ahead. For
|
||||
* squashfs, I/O is not deferred, it is done immediately in readpage,
|
||||
* squashfs, I/O is not deferred, it is done immediately in read_folio,
|
||||
* which means the user would always have to wait their own I/O. So the effect
|
||||
* of readahead is very weak for squashfs. squashfs_bdi_init will set
|
||||
* sb->s_bdi->ra_pages and sb->s_bdi->io_pages to 0 and close readahead for
|
||||
|
|
|
@ -30,8 +30,9 @@
|
|||
#include "squashfs.h"
|
||||
#include "xattr.h"
|
||||
|
||||
static int squashfs_symlink_readpage(struct file *file, struct page *page)
|
||||
static int squashfs_symlink_read_folio(struct file *file, struct folio *folio)
|
||||
{
|
||||
struct page *page = &folio->page;
|
||||
struct inode *inode = page->mapping->host;
|
||||
struct super_block *sb = inode->i_sb;
|
||||
struct squashfs_sb_info *msblk = sb->s_fs_info;
|
||||
|
@ -101,7 +102,7 @@ error_out:
|
|||
|
||||
|
||||
const struct address_space_operations squashfs_symlink_aops = {
|
||||
.readpage = squashfs_symlink_readpage
|
||||
.read_folio = squashfs_symlink_read_folio
|
||||
};
|
||||
|
||||
const struct inode_operations squashfs_symlink_inode_ops = {
|
||||
|
|
Loading…
Reference in New Issue