mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 13:41:51 +00:00
fuse: Convert fuse 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
42d7a524e9
commit
5efd00e489
@ -1957,20 +1957,20 @@ void fuse_init_dir(struct inode *inode)
|
|||||||
fi->rdc.version = 0;
|
fi->rdc.version = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int fuse_symlink_readpage(struct file *null, struct page *page)
|
static int fuse_symlink_read_folio(struct file *null, struct folio *folio)
|
||||||
{
|
{
|
||||||
int err = fuse_readlink_page(page->mapping->host, page);
|
int err = fuse_readlink_page(folio->mapping->host, &folio->page);
|
||||||
|
|
||||||
if (!err)
|
if (!err)
|
||||||
SetPageUptodate(page);
|
folio_mark_uptodate(folio);
|
||||||
|
|
||||||
unlock_page(page);
|
folio_unlock(folio);
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct address_space_operations fuse_symlink_aops = {
|
static const struct address_space_operations fuse_symlink_aops = {
|
||||||
.readpage = fuse_symlink_readpage,
|
.read_folio = fuse_symlink_read_folio,
|
||||||
};
|
};
|
||||||
|
|
||||||
void fuse_init_symlink(struct inode *inode)
|
void fuse_init_symlink(struct inode *inode)
|
||||||
|
@ -857,8 +857,9 @@ static int fuse_do_readpage(struct file *file, struct page *page)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int fuse_readpage(struct file *file, struct page *page)
|
static int fuse_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;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
@ -3174,7 +3175,7 @@ static const struct file_operations fuse_file_operations = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const struct address_space_operations fuse_file_aops = {
|
static const struct address_space_operations fuse_file_aops = {
|
||||||
.readpage = fuse_readpage,
|
.read_folio = fuse_read_folio,
|
||||||
.readahead = fuse_readahead,
|
.readahead = fuse_readahead,
|
||||||
.writepage = fuse_writepage,
|
.writepage = fuse_writepage,
|
||||||
.writepages = fuse_writepages,
|
.writepages = fuse_writepages,
|
||||||
|
Loading…
Reference in New Issue
Block a user