mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
romfs: Convert romfs 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
1a6417885b
commit
f91dbd0222
1 changed files with 5 additions and 4 deletions
|
@ -18,7 +18,7 @@
|
||||||
* Changed for 2.1.19 modules
|
* Changed for 2.1.19 modules
|
||||||
* Jan 1997 Initial release
|
* Jan 1997 Initial release
|
||||||
* Jun 1997 2.1.43+ changes
|
* Jun 1997 2.1.43+ changes
|
||||||
* Proper page locking in readpage
|
* Proper page locking in read_folio
|
||||||
* Changed to work with 2.1.45+ fs
|
* Changed to work with 2.1.45+ fs
|
||||||
* Jul 1997 Fixed follow_link
|
* Jul 1997 Fixed follow_link
|
||||||
* 2.1.47
|
* 2.1.47
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
* dentries in lookup
|
* dentries in lookup
|
||||||
* clean up page flags setting
|
* clean up page flags setting
|
||||||
* (error, uptodate, locking) in
|
* (error, uptodate, locking) in
|
||||||
* in readpage
|
* in read_folio
|
||||||
* use init_special_inode for
|
* use init_special_inode for
|
||||||
* fifos/sockets (and streamline) in
|
* fifos/sockets (and streamline) in
|
||||||
* read_inode, fix _ops table order
|
* read_inode, fix _ops table order
|
||||||
|
@ -99,8 +99,9 @@ static struct inode *romfs_iget(struct super_block *sb, unsigned long pos);
|
||||||
/*
|
/*
|
||||||
* read a page worth of data from the image
|
* read a page worth of data from the image
|
||||||
*/
|
*/
|
||||||
static int romfs_readpage(struct file *file, struct page *page)
|
static int romfs_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;
|
||||||
loff_t offset, size;
|
loff_t offset, size;
|
||||||
unsigned long fillsize, pos;
|
unsigned long fillsize, pos;
|
||||||
|
@ -142,7 +143,7 @@ static int romfs_readpage(struct file *file, struct page *page)
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct address_space_operations romfs_aops = {
|
static const struct address_space_operations romfs_aops = {
|
||||||
.readpage = romfs_readpage
|
.read_folio = romfs_read_folio
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue