@@ -469,7 +469,7 @@ static int nfs_launder_folio(struct folio *folio)
inode->i_ino, folio_pos(folio));
folio_wait_fscache(folio);
- return nfs_wb_page(inode, &folio->page);
+ return nfs_wb_folio(inode, folio);
}
static int nfs_swap_activate(struct swap_info_struct *sis, struct file *file,
@@ -2106,6 +2106,19 @@ int nfs_wb_page(struct inode *inode, struct page *page)
return ret;
}
+/**
+ * nfs_wb_folio - Write back all requests on one page
+ * @inode: pointer to page
+ * @folio: pointer to folio
+ *
+ * Assumes that the folio has been locked by the caller, and will
+ * not unlock it.
+ */
+int nfs_wb_folio(struct inode *inode, struct folio *folio)
+{
+ return nfs_wb_page(inode, &folio->page);
+}
+
#ifdef CONFIG_MIGRATION
int nfs_migrate_folio(struct address_space *mapping, struct folio *dst,
struct folio *src, enum migrate_mode mode)
@@ -578,6 +578,7 @@ extern int nfs_updatepage(struct file *, struct page *, unsigned int, unsigned
*/
extern int nfs_sync_inode(struct inode *inode);
extern int nfs_wb_all(struct inode *inode);
+extern int nfs_wb_folio(struct inode *inode, struct folio *folio);
extern int nfs_wb_page(struct inode *inode, struct page *page);
int nfs_wb_folio_cancel(struct inode *inode, struct folio *folio);
extern int nfs_commit_inode(struct inode *, int);