Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7fdc49c4e49ba926348f71844cda7f5e12709738
Commit:     7fdc49c4e49ba926348f71844cda7f5e12709738
Parent:     8850df999cd16aa141098e2e8be04a590276f3cc
Author:     Trond Myklebust <[EMAIL PROTECTED]>
AuthorDate: Fri Sep 28 19:11:33 2007 -0400
Committer:  Trond Myklebust <[EMAIL PROTECTED]>
CommitDate: Tue Oct 9 17:19:08 2007 -0400

    NFS: Fix the ESTALE "revalidation" in _nfs_revalidate_inode()
    
    For one thing, the test NFS_ATTRTIMEO() == 0 makes no sense: we're
    testing whether or not the cache timeout length is zero, which is totally
    unrelated to the issue of whether or not we trust the file staleness.
    
    Secondly, we do not want to retry the GETATTR once a file has been declared
    stale by the server: we rather want to discard that inode as soon as
    possible, since there are broken servers still in use out there that reuse
    filehandles on new files.
    
    Signed-off-by: Trond Myklebust <[EMAIL PROTECTED]>
---
 fs/nfs/inode.c |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index e37faa3..185cfd0 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -607,16 +607,10 @@ __nfs_revalidate_inode(struct nfs_server *server, struct 
inode *inode)
        status = nfs_wait_on_inode(inode);
        if (status < 0)
                goto out;
-       if (NFS_STALE(inode)) {
-               status = -ESTALE;
-               /* Do we trust the cached ESTALE? */
-               if (NFS_ATTRTIMEO(inode) != 0) {
-                       if (nfsi->cache_validity & 
(NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ATIME)) {
-                               /* no */
-                       } else
-                               goto out;
-               }
-       }
+
+       status = -ESTALE;
+       if (NFS_STALE(inode))
+               goto out;
 
        status = NFS_PROTO(inode)->getattr(server, NFS_FH(inode), &fattr);
        if (status != 0) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to