Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp49143pxb; Wed, 14 Apr 2021 09:09:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzO3Yq3AK7+wraqrbG68We/PIilzP9Le9OER0qZ/oK/CGu5bJuvgbPhpPTURtGT7gk4aMMY X-Received: by 2002:a05:6402:394:: with SMTP id o20mr42836988edv.10.1618416565264; Wed, 14 Apr 2021 09:09:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618416565; cv=none; d=google.com; s=arc-20160816; b=YVzbLiOSgcw4zDvBuIOgIOzyzU55hKxi+9/+FInEcn360eQ/yQQnh8W8Q93lJcfndS bdIYEnShoiPMek93Zj8IjNakrNWxlxsWo6Ex7RRsVk3890hWGWdupl4a3qxxcNdvVdQb Lio7MTav7Jw6lllCXNgn0cmskGtdEROrMJB4Q9BlXqdQmEIPqJGmTldfdmWmNzNwMw31 X8RYZp9WfcqMfT/HVh6RYmvXrlsR+VMpwFE+L0cJVQD1Szk8xZIse+9rgg07xUOJejuG FI45HgbE3zjf4HCn0qmx3LzSrUgLqG7nbJ6iTl7bLLoaY6/GvNYBj7Oux4jGDMrHHh4s ptyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Bq7mS+hxb1CGQ7RJdd1AqHJ0hzLGfFey+g2cjWNH8LU=; b=q+z/kZq9XUSy9bu0PBwDoQ3bt5Kj1XsPbv7Xg+e7/keMOUaZ0jrHceYmiPNU7PoLAN g3/5lYh5N64jsHw8Hs14AQPzAKoYQqfMpZgeQ8UmI2beQUvvUS4sraC8qeEohfaBF31F myJQptXQdsdO8JCinvb4lUaoC8vWup5pYuHvEbqhRz4clYmQLng6nwXgX1adhz7ch1y6 0gh2TS5f3bXm8WMGeQxYEkv8Az2MH7/38sTctclmfkuHxdEUKHU5WOBQjV1hKCbQqHSE 2y7aoVPV1PWJN+yFz6ooy/jUtt0ZzinDymSrDqh1gnfIPBsBTtYQSz9EauGyo4Wma8ZT cbSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YXKnSvml; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r21si12861575ejc.339.2021.04.14.09.09.01; Wed, 14 Apr 2021 09:09:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YXKnSvml; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351576AbhDNNoj (ORCPT + 99 others); Wed, 14 Apr 2021 09:44:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:52168 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351612AbhDNNoY (ORCPT ); Wed, 14 Apr 2021 09:44:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 618B36120E for ; Wed, 14 Apr 2021 13:44:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618407843; bh=9VuDnCFm3maQ+Cqaa143l09LCyEAuunSAc2xZV4yGlc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YXKnSvmlTzExCDkXqAFxIjjmdRL6tr9JcxJTJlJwmgnsTRVhMVmF8hd8k0qm9dGNC hQHhKI9nOj27eK79K6w9mozP3W+Oxp085Vce55kQcOOLI8sFDddKVpqtr44NpcrJiK CucXyGdHjPwhTMAffgUE8uMw6bHdKfsDlCvELGjnrkMlBR2KfdD0CiPHleaGdrjftd wmnIXuHgqBYqW8HWcP8CbRmT9kkzmwKwMM2oP8UuMpHsspiDZtRi0n97M/2ILIs1Kp w419aVg4No6ihjFj3iTm+iWHnfHJ7wHfWTU9yx9lL7UrU7QI0UT+JDXOaQAytMkmPs RKa+HZWKQm89A== From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Subject: [PATCH v2 19/26] NFSv4: Don't modify the change attribute cached in the inode Date: Wed, 14 Apr 2021 09:43:46 -0400 Message-Id: <20210414134353.11860-20-trondmy@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210414134353.11860-19-trondmy@kernel.org> References: <20210414134353.11860-1-trondmy@kernel.org> <20210414134353.11860-2-trondmy@kernel.org> <20210414134353.11860-3-trondmy@kernel.org> <20210414134353.11860-4-trondmy@kernel.org> <20210414134353.11860-5-trondmy@kernel.org> <20210414134353.11860-6-trondmy@kernel.org> <20210414134353.11860-7-trondmy@kernel.org> <20210414134353.11860-8-trondmy@kernel.org> <20210414134353.11860-9-trondmy@kernel.org> <20210414134353.11860-10-trondmy@kernel.org> <20210414134353.11860-11-trondmy@kernel.org> <20210414134353.11860-12-trondmy@kernel.org> <20210414134353.11860-13-trondmy@kernel.org> <20210414134353.11860-14-trondmy@kernel.org> <20210414134353.11860-15-trondmy@kernel.org> <20210414134353.11860-16-trondmy@kernel.org> <20210414134353.11860-17-trondmy@kernel.org> <20210414134353.11860-18-trondmy@kernel.org> <20210414134353.11860-19-trondmy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Trond Myklebust 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 --- fs/nfs/write.c | 3 --- 1 file changed, 3 deletions(-) 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. */ 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); -- 2.30.2