Skip to content

Commit

Permalink
NFS: Do not flush the readdir cache in nfs_dentry_iput()
Browse files Browse the repository at this point in the history
The original premise in commit 83672d3 ("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>
  • Loading branch information
Trond Myklebust committed Oct 4, 2021
1 parent cec08f4 commit b97583b
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions fs/nfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b97583b

Please sign in to comment.