summaryrefslogtreecommitdiff
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2025-09-03 11:48:57 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-09-19 16:37:28 +0200
commitfc3bc5d2490298c38263d043db71a1521d5591dd (patch)
tree36409c3f061544628dd65debdd7d7fd26d03a22e /fs/nfs/write.c
parent5ae2ee9e1cd67de834b2dc60397304ac24a84817 (diff)
NFS: nfs_invalidate_folio() must observe the offset and size arguments
[ Upstream commit b7b8574225e9d2b5f1fb5483886ab797892f43b5 ] If we're truncating part of the folio, then we need to write out the data on the part that is not covered by the cancellation. Fixes: d47992f86b30 ("mm: change invalidatepage prototype to accept length") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r--fs/nfs/write.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index ff29335ed859..08fd1c0d45ec 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -2045,6 +2045,7 @@ int nfs_wb_folio_cancel(struct inode *inode, struct folio *folio)
* release it */
nfs_inode_remove_request(req);
nfs_unlock_and_release_request(req);
+ folio_cancel_dirty(folio);
}
return ret;