diff mbox series

[v2,19/26] NFSv4: Don't modify the change attribute cached in the inode

Message ID 20210414134353.11860-20-trondmy@kernel.org (mailing list archive)
State New
Headers show
Series Attribute revalidation updates | expand

Commit Message

trondmy@kernel.org April 14, 2021, 1:43 p.m. UTC
From: Trond Myklebust <trond.myklebust@hammerspace.com>

When the client is caching data and a write delegation is held, then the
server may send a CB_GETATTR to query the attributes. When this happens,
the client is supposed to bump the change attribute value that it
returns if it holds cached data.
However that process uses a value that is stored in the delegation. We
do not want to bump the change attribute held in the inode.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
 fs/nfs/write.c | 3 ---
 1 file changed, 3 deletions(-)
diff mbox series


diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 61d1174935b6..3bf82178166a 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -764,9 +764,6 @@  static void nfs_inode_add_request(struct inode *inode, struct nfs_page *req)
 	 * with invalidate/truncate.
-	if (!nfs_have_writebacks(inode) &&
-	    NFS_PROTO(inode)->have_delegation(inode, FMODE_WRITE))
-		inode_inc_iversion_raw(inode);
 	if (likely(!PageSwapCache(req->wb_page))) {
 		set_bit(PG_MAPPED, &req->wb_flags);