]> err.no Git - linux-2.6/commitdiff
NFS: nfs_post_op_update_inode don't update cache_change_attribute
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 1 Oct 2007 13:59:15 +0000 (09:59 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 9 Oct 2007 21:19:37 +0000 (17:19 -0400)
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 <Trond.Myklebust@netapp.com>
fs/nfs/inode.c

index 7fdaaf5869ce947d277e4b138eb4667727960396..d722a0e84361b95920b96b6b60e8b4b631d48a7a 100644 (file)
@@ -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;
 }
 
 /**