Skip to content

Commit 15a30ab

Browse files
author
Matthew Wilcox (Oracle)
committed
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) <[email protected]> Tested-by: Damien Le Moal <[email protected]> Acked-by: Damien Le Moal <[email protected]> Tested-by: Mike Marshall <[email protected]> # orangefs Tested-by: David Howells <[email protected]> # afs
1 parent 2bf06b8 commit 15a30ab

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

fs/nfs/file.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -472,15 +472,15 @@ static void nfs_check_dirty_writeback(struct page *page,
472472
* - Caller holds page lock
473473
* - Return 0 if successful, -error otherwise
474474
*/
475-
static int nfs_launder_page(struct page *page)
475+
static int nfs_launder_folio(struct folio *folio)
476476
{
477-
struct inode *inode = page_file_mapping(page)->host;
477+
struct inode *inode = folio->mapping->host;
478478

479-
dfprintk(PAGECACHE, "NFS: launder_page(%ld, %llu)\n",
480-
inode->i_ino, (long long)page_offset(page));
479+
dfprintk(PAGECACHE, "NFS: launder_folio(%ld, %llu)\n",
480+
inode->i_ino, folio_pos(folio));
481481

482-
wait_on_page_fscache(page);
483-
return nfs_wb_page(inode, page);
482+
folio_wait_fscache(folio);
483+
return nfs_wb_page(inode, &folio->page);
484484
}
485485

486486
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 = {
526526
#ifdef CONFIG_MIGRATION
527527
.migratepage = nfs_migrate_page,
528528
#endif
529-
.launder_page = nfs_launder_page,
529+
.launder_folio = nfs_launder_folio,
530530
.is_dirty_writeback = nfs_check_dirty_writeback,
531531
.error_remove_page = generic_error_remove_page,
532532
.swap_activate = nfs_swap_activate,

0 commit comments

Comments
 (0)