linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] NFS: Do not flush the readdir cache in nfs_dentry_iput()
@ 2021-10-03  0:08 trondmy
  0 siblings, 0 replies; only message in thread
From: trondmy @ 2021-10-03  0:08 UTC (permalink / raw)
  To: linux-nfs

From: Trond Myklebust <trond.myklebust@hammerspace.com>

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 <trond.myklebust@hammerspace.com>
---
 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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-03  0:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-03  0:08 [PATCH] NFS: Do not flush the readdir cache in nfs_dentry_iput() trondmy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).