diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-10-27 18:42:04 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-12-01 17:21:37 -0500 |
commit | 1ad13dbc85911fcf15232342205c92e250335267 (patch) | |
tree | 2efa41e2ab94c12b863a93bde4e51aa729d515f0 /fs/nfs/delegation.c | |
parent | 3ecefc9295991eaaad4c67915c6384e5d18cc632 (diff) |
NFSv4: Optimise away forced revalidation when we know the attributes are OK
The NFS_INO_REVAL_FORCED flag needs to be set if we just got a delegation,
and we see that there might still be some ambiguity as to whether or not
our attribute or data cache are valid.
In practice, this means that a call to nfs_check_inode_attributes() will
have noticed a discrepancy between cached attributes and measured ones,
so let's move the setting of NFS_INO_REVAL_FORCED to there.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/delegation.c')
-rw-r--r-- | fs/nfs/delegation.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index dff600ae0d74..d7df5e67b0c1 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c | |||
@@ -391,10 +391,6 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct | |||
391 | rcu_assign_pointer(nfsi->delegation, delegation); | 391 | rcu_assign_pointer(nfsi->delegation, delegation); |
392 | delegation = NULL; | 392 | delegation = NULL; |
393 | 393 | ||
394 | /* Ensure we revalidate the attributes and page cache! */ | ||
395 | spin_lock(&inode->i_lock); | ||
396 | nfsi->cache_validity |= NFS_INO_REVAL_FORCED; | ||
397 | spin_unlock(&inode->i_lock); | ||
398 | trace_nfs4_set_delegation(inode, res->delegation_type); | 394 | trace_nfs4_set_delegation(inode, res->delegation_type); |
399 | 395 | ||
400 | out: | 396 | out: |