Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7668fdbe9aaeab705d1169ac86d0d18a12906d06
Commit:     7668fdbe9aaeab705d1169ac86d0d18a12906d06
Parent:     12b373ebf05485d4937dd63a00c16f8efeaa79ba
Author:     Trond Myklebust <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 1 09:59:15 2007 -0400
Committer:  Trond Myklebust <[EMAIL PROTECTED]>
CommitDate: Tue Oct 9 17:19:37 2007 -0400

    NFS: nfs_post_op_update_inode don't update cache_change_attribute
    
    If nfs_post_op_update_inode fails because the server didn't return any
    attributes, then we let the subsequent inode revalidation update
    cache_change_attribute.
    
    Signed-off-by: Trond Myklebust <[EMAIL PROTECTED]>
---
 fs/nfs/inode.c |   18 +++++++-----------
 1 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 7fdaaf5..d722a0e 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -912,18 +912,14 @@ int nfs_refresh_inode(struct inode *inode, struct 
nfs_fattr *fattr)
 int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr)
 {
        struct nfs_inode *nfsi = NFS_I(inode);
-       int status = 0;
 
-       if (unlikely((fattr->valid & NFS_ATTR_FATTR) == 0)) {
-               spin_lock(&inode->i_lock);
-               nfsi->cache_validity |= 
NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ATTR|NFS_INO_REVAL_PAGECACHE;
-               nfsi->cache_change_attribute = jiffies;
-               spin_unlock(&inode->i_lock);
-               goto out;
-       }
-       status = nfs_refresh_inode(inode, fattr);
-out:
-       return status;
+       if (fattr->valid & NFS_ATTR_FATTR)
+               return nfs_refresh_inode(inode, fattr);
+
+       spin_lock(&inode->i_lock);
+       nfsi->cache_validity |= 
NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ATTR|NFS_INO_REVAL_PAGECACHE;
+       spin_unlock(&inode->i_lock);
+       return 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