diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2023-01-19 16:33:40 -0500 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2023-02-14 14:22:32 -0500 |
commit | 4b27232a6e064f3d779cfa76cd251d6023949d22 (patch) | |
tree | b7dd713f19824f0cfa2e0695f64d1a270d7174fb /fs/nfs/write.c | |
parent | cbefa53cb1fe30ae4467be863afc3cf60238fd08 (diff) |
NFS: Add a helper nfs_wb_folio()
...and use it in nfs_launder_folio().
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r-- | fs/nfs/write.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 1cbb92824791..c80a57801b2e 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -2106,6 +2106,19 @@ out_error: 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) |