Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2429039pxb; Sat, 2 Oct 2021 17:12:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUArWghIlW/hy9iYW2WI94ltXPQsGyGywXcusOjaxcF8f0//rD5/F96WN9rFxqKv2KsbT5 X-Received: by 2002:aa7:8298:0:b029:338:340:a085 with SMTP id s24-20020aa782980000b02903380340a085mr17720955pfm.46.1633219975281; Sat, 02 Oct 2021 17:12:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633219975; cv=none; d=google.com; s=arc-20160816; b=RjNXf9riLUlW9UQY5Rr4zsxtHgEQPQZucviBaqXF2cXbBx5YMRwmr7qabFMVV5bzS5 RBRd7YKplxHLuerUqJq15Z10kr/hknfT6nL4D/brnYnnrAOaXTse85iuC8NDxwxW/pOl Vcr+f4K8zPqdaZED33rbM5xAEk40VDnfqxc98sFFt0rDpOts97zCkEnqQjDZvR3V1Q73 5gPkiNRtvoB9HN0Xv2aaYBwRbOTMHC438v0x0o0JX3As6wJl1UtyOyXHBqZCKTfSB8Z9 dP8rUJeWEOc7yesejS+ZRxjh4KbBibYZ3GMuprj6e8/10GvLFFYtbZpJ0pfy0Eb8RSCV MO2Q== 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 :message-id:date:subject:to:from:dkim-signature; bh=sNu08vspzIbzaU0ahDyVGYNusJXQ95DebXAJFPP6Jeg=; b=fZdmZBC0XIPUiE6e4z12Ce1B+/qqYnTQTKQyC1ybXjK1tECpH+U7cFJhII7ZzldhZx gsuPAKVeC0YanVFyDXnBjGEbH6BvarE61qPZOIqm74BF2EdQU1unJZn1kgDJk3g7MXIz BpDeTPwgjG7KIH121NS+5YkmlJHu+BYRvSKVK2/RPSwO+PkHYUuwZF2+VwCrETmCIomy AQjoiIsYCX6I/xjR1GmVI3GbMjIW7bOMoDv5z1jiwFs4tyujX2cP+hq7DHpV0jbHQ2/A 5j7/G8tTmBwVBypiICoqvgGyZvZFGrNfaJZUoItzBSkJqXkK1HmaAYgGl+tODXsyCIC4 8x2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RELbbSfR; 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 e1si11633122pln.458.2021.10.02.17.12.29; Sat, 02 Oct 2021 17:12:55 -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=RELbbSfR; 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 S234248AbhJCAJw (ORCPT + 99 others); Sat, 2 Oct 2021 20:09:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:54688 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234236AbhJCAJw (ORCPT ); Sat, 2 Oct 2021 20:09:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6BE8961AA9 for ; Sun, 3 Oct 2021 00:08:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633219685; bh=8vRNBmIxbflQsC0Gsd4s5uXvnN4ZrvTwKRf1LikfBhw=; h=From:To:Subject:Date:From; b=RELbbSfRSV5AnEdxUjxBQgKIEnW/35j6JssK9sCS4NbcJBS/rauEgxNHdUPm+wWMC ArHklHF3lDEI69PZvRZLr48SSNja6o1Q+iUzW9IKwPtisL0L0VkXoeQg9iEsNcRPFI /Z9dgEfYr98UvnGc31tKYTFEPmqV+kM2FA1bj5UHvKLCzfhdFvYYIR1URAFqtZKMGd qjaOvZD1wYP4lwnqI3dKJBS1C3nB/RGN++1KcdO4tK8q0NJYCr2HkOR/FY6dwPoaWB tdWwEUuxX42NQqq9JRHLsB8Oa+Rmyv10chZzTm9Fi4UdsqSvaJZ4C9oOTLFCX8ahEl B8NlXe4qda7zQ== From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Subject: [PATCH] NFS: Do not flush the readdir cache in nfs_dentry_iput() Date: Sat, 2 Oct 2021 20:08:04 -0400 Message-Id: <20211003000804.65661-1-trondmy@kernel.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Trond Myklebust The original premise in commit 83672d392f7b ("NFS: Fix directory caching problem - with test case and patch.") was that readdirplus was caching attribute information and replaying it later. This is no longer the case. Signed-off-by: Trond Myklebust --- fs/nfs/dir.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 3fafecdb2070..210c5945ac2b 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1727,10 +1727,6 @@ static void nfs_drop_nlink(struct inode *inode) */ static void nfs_dentry_iput(struct dentry *dentry, struct inode *inode) { - if (S_ISDIR(inode->i_mode)) - /* drop any readdir cache as it could easily be old */ - nfs_set_cache_invalid(inode, NFS_INO_INVALID_DATA); - if (dentry->d_flags & DCACHE_NFSFS_RENAMED) { nfs_complete_unlink(dentry, inode); nfs_drop_nlink(inode); -- 2.31.1