Commit 7668fdbe authored by Trond Myklebust's avatar Trond Myklebust

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: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 12b373eb
...@@ -912,18 +912,14 @@ int nfs_refresh_inode(struct inode *inode, struct nfs_fattr *fattr) ...@@ -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) int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr)
{ {
struct nfs_inode *nfsi = NFS_I(inode); struct nfs_inode *nfsi = NFS_I(inode);
int status = 0;
if (unlikely((fattr->valid & NFS_ATTR_FATTR) == 0)) { if (fattr->valid & NFS_ATTR_FATTR)
spin_lock(&inode->i_lock); return nfs_refresh_inode(inode, fattr);
nfsi->cache_validity |= NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ATTR|NFS_INO_REVAL_PAGECACHE;
nfsi->cache_change_attribute = jiffies; spin_lock(&inode->i_lock);
spin_unlock(&inode->i_lock); nfsi->cache_validity |= NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ATTR|NFS_INO_REVAL_PAGECACHE;
goto out; spin_unlock(&inode->i_lock);
} return 0;
status = nfs_refresh_inode(inode, fattr);
out:
return status;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment