]> git.neil.brown.name Git - history.git/commitdiff
Fix a problem whereby READDIRPLUS was causing lookups to result in
authorTrond Myklebust <trond.myklebust@fys.uio.no>
Thu, 21 Aug 2003 11:43:45 +0000 (04:43 -0700)
committerTrond Myklebust <trond.myklebust@fys.uio.no>
Thu, 21 Aug 2003 11:43:45 +0000 (04:43 -0700)
ESTALE errors.

fs/nfs/dir.c

index fd894fa6584bc6c7059bf7ed79c2320aeb7ec169..dab0b0bd0ef35989f49b6fb5b7e363028c7f95f4 100644 (file)
@@ -557,7 +557,7 @@ static int nfs_lookup_revalidate(struct dentry * dentry, struct nameidata *nd)
        /* Force a full look up iff the parent directory has changed */
        if (nfs_check_verifier(dir, dentry)) {
                if (nfs_lookup_verify_inode(inode, isopen))
-                       goto out_bad;
+                       goto out_zap_parent;
                goto out_valid;
        }
 
@@ -566,7 +566,7 @@ static int nfs_lookup_revalidate(struct dentry * dentry, struct nameidata *nd)
                if (memcmp(NFS_FH(inode), &fhandle, sizeof(struct nfs_fh))!= 0)
                        goto out_bad;
                if (nfs_lookup_verify_inode(inode, isopen))
-                       goto out_bad;
+                       goto out_zap_parent;
                goto out_valid_renew;
        }
 
@@ -587,6 +587,8 @@ static int nfs_lookup_revalidate(struct dentry * dentry, struct nameidata *nd)
        unlock_kernel();
        dput(parent);
        return 1;
+out_zap_parent:
+       nfs_zap_caches(dir);
  out_bad:
        NFS_CACHEINV(dir);
        if (inode && S_ISDIR(inode->i_mode)) {