aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2025-09-06 12:48:16 -0400
committerAnna Schumaker <anna.schumaker@oracle.com>2025-09-23 13:29:50 -0400
commit902893e3907620153a17fb40834ab6fba9f83fab (patch)
treeca2acaa646a8ee86bc1a07a541d56e0ad55911a0 /fs/nfs/write.c
parentfilemap: Add a version of folio_end_writeback that ignores dropbehind (diff)
downloadlinux-rng-902893e3907620153a17fb40834ab6fba9f83fab.tar.xz
linux-rng-902893e3907620153a17fb40834ab6fba9f83fab.zip
NFS: Enable use of the RWF_DONTCACHE flag on the NFS client
The NFS client needs to defer dropbehind until after any writes to the folio have been persisted on the server. Since this may be a 2 step process, use folio_end_writeback_no_dropbehind() to allow release of the writeback flag, and then call folio_end_dropbehind() once the COMMIT is done. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r--fs/nfs/write.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 66acc5247435..ad588ed59c09 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -296,7 +296,7 @@ static void nfs_folio_end_writeback(struct folio *folio)
{
struct nfs_server *nfss = NFS_SERVER(folio->mapping->host);
- folio_end_writeback(folio);
+ folio_end_writeback_no_dropbehind(folio);
if (atomic_long_dec_return(&nfss->writeback) <
NFS_CONGESTION_OFF_THRESH) {
nfss->write_congested = 0;
@@ -748,6 +748,8 @@ static void nfs_inode_remove_request(struct nfs_page *req)
clear_bit(PG_MAPPED, &req->wb_head->wb_flags);
}
spin_unlock(&mapping->i_private_lock);
+
+ folio_end_dropbehind(folio);
}
nfs_page_group_unlock(req);