diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-02-09 21:21:57 +0100 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-03-15 13:23:30 +0100 |
commit | 15a30ab2b35b02a9f2cf7f78f5b5709b484c9a18 (patch) | |
tree | 4f52de70dc64a1e289773bd79f88e4926a87c5c1 /fs | |
parent | fuse: Convert from launder_page to launder_folio (diff) | |
download | linux-15a30ab2b35b02a9f2cf7f78f5b5709b484c9a18.tar.xz linux-15a30ab2b35b02a9f2cf7f78f5b5709b484c9a18.zip |
nfs: Convert from launder_page to launder_folio
We don't need to use page_file_mapping() here because launder_folio
is never called for swap cache pages. We also don't need to
cast an loff_t in order to print it.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Tested-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Acked-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Tested-by: Mike Marshall <hubcap@omnibond.com> # orangefs
Tested-by: David Howells <dhowells@redhat.com> # afs
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/file.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 79664f04d74b..5dadf6eadabe 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -472,15 +472,15 @@ static void nfs_check_dirty_writeback(struct page *page, * - Caller holds page lock * - Return 0 if successful, -error otherwise */ -static int nfs_launder_page(struct page *page) +static int nfs_launder_folio(struct folio *folio) { - struct inode *inode = page_file_mapping(page)->host; + struct inode *inode = folio->mapping->host; - dfprintk(PAGECACHE, "NFS: launder_page(%ld, %llu)\n", - inode->i_ino, (long long)page_offset(page)); + dfprintk(PAGECACHE, "NFS: launder_folio(%ld, %llu)\n", + inode->i_ino, folio_pos(folio)); - wait_on_page_fscache(page); - return nfs_wb_page(inode, page); + folio_wait_fscache(folio); + return nfs_wb_page(inode, &folio->page); } static int nfs_swap_activate(struct swap_info_struct *sis, struct file *file, @@ -526,7 +526,7 @@ const struct address_space_operations nfs_file_aops = { #ifdef CONFIG_MIGRATION .migratepage = nfs_migrate_page, #endif - .launder_page = nfs_launder_page, + .launder_folio = nfs_launder_folio, .is_dirty_writeback = nfs_check_dirty_writeback, .error_remove_page = generic_error_remove_page, .swap_activate = nfs_swap_activate, |