Skip to content

Commit

Permalink
NFS: nfs_post_op_update_inode don't update cache_change_attribute
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Oct 9, 2007
1 parent 12b373e commit 7668fdb
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions fs/nfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 7668fdb

Please sign in to comment.