Skip to contentSkip to conversation

NFS: Do not flush the readdir cache in nfs_dentry_iput()

PATCH New [email protected] 1 participant 1 message Oct 3, 2021

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/1 NFS: Do not flush the readdir cache in nfs_dentry_iput()

From: Trond Myklebust <[email protected]>

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.

---
 fs/nfs/dir.c | 4 ----
 1 file changed, 4 deletions(-)
fs/nfs/dir.c +0 -4
index 3fafecdb2070..210c5945ac2b 100644
@@ -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);
Signature · 1 line
2.31.1