summaryrefslogtreecommitdiffstats
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r--fs/nfs/inode.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 7fdaaf5869c..d722a0e8436 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;
}
/**