mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-01 09:13:37 +00:00
nfs: Convert nfs 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
bb8e283a64
commit
65d023af7f
3 changed files with 5 additions and 4 deletions
|
|
@ -337,7 +337,7 @@ start:
|
||||||
} else if (!once_thru &&
|
} else if (!once_thru &&
|
||||||
nfs_want_read_modify_write(file, page, pos, len)) {
|
nfs_want_read_modify_write(file, page, pos, len)) {
|
||||||
once_thru = 1;
|
once_thru = 1;
|
||||||
ret = nfs_readpage(file, page);
|
ret = nfs_read_folio(file, page_folio(page));
|
||||||
put_page(page);
|
put_page(page);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
goto start;
|
goto start;
|
||||||
|
|
@ -514,7 +514,7 @@ static void nfs_swap_deactivate(struct file *file)
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct address_space_operations nfs_file_aops = {
|
const struct address_space_operations nfs_file_aops = {
|
||||||
.readpage = nfs_readpage,
|
.read_folio = nfs_read_folio,
|
||||||
.readahead = nfs_readahead,
|
.readahead = nfs_readahead,
|
||||||
.dirty_folio = filemap_dirty_folio,
|
.dirty_folio = filemap_dirty_folio,
|
||||||
.writepage = nfs_writepage,
|
.writepage = nfs_writepage,
|
||||||
|
|
|
||||||
|
|
@ -333,8 +333,9 @@ out:
|
||||||
* - The error flag is set for this page. This happens only when a
|
* - The error flag is set for this page. This happens only when a
|
||||||
* previous async read operation failed.
|
* previous async read operation failed.
|
||||||
*/
|
*/
|
||||||
int nfs_readpage(struct file *file, struct page *page)
|
int nfs_read_folio(struct file *file, struct folio *folio)
|
||||||
{
|
{
|
||||||
|
struct page *page = &folio->page;
|
||||||
struct nfs_readdesc desc;
|
struct nfs_readdesc desc;
|
||||||
struct inode *inode = page_file_mapping(page)->host;
|
struct inode *inode = page_file_mapping(page)->host;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
|
||||||
|
|
@ -594,7 +594,7 @@ static inline bool nfs_have_writebacks(const struct inode *inode)
|
||||||
/*
|
/*
|
||||||
* linux/fs/nfs/read.c
|
* linux/fs/nfs/read.c
|
||||||
*/
|
*/
|
||||||
extern int nfs_readpage(struct file *, struct page *);
|
int nfs_read_folio(struct file *, struct folio *);
|
||||||
void nfs_readahead(struct readahead_control *);
|
void nfs_readahead(struct readahead_control *);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue