NFSv4: Don't modify the change attribute cached in the inode
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 12 Apr 2021 16:15:50 +0000 (12:15 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Tue, 13 Apr 2021 14:04:05 +0000 (10:04 -0400)
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

index 61d1174935b6ec21f08efab27e2eb1cadddb30f5..3bf82178166a7dc7faa3e42e9dca49bf0d9d7642 100644 (file)
@@ -764,9 +764,6 @@ static void nfs_inode_add_request(struct inode *inode, struct nfs_page *req)
         * with invalidate/truncate.
         */
        spin_lock(&mapping->private_lock);
-       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);
                SetPagePrivate(req->wb_page);