diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2021-03-08 14:42:54 -0500 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2021-03-08 16:13:55 -0500 |
commit | ac46b3d768e4c2754f7b191b81e1bea582e11907 (patch) | |
tree | 5aee269e85430fcfe804d9de57033f33a5ca97f1 /fs/nfs/inode.c | |
parent | fd6d3feed041e96b84680d0bfc1e7abc8f65de92 (diff) | |
download | linux-ac46b3d768e4c2754f7b191b81e1bea582e11907.tar.bz2 |
NFS: Fix open coded versions of nfs_set_cache_invalid()
nfs_set_cache_invalid() has code to handle delegations, and other
optimisations, so let's use it when appropriate.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r-- | fs/nfs/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index d21bfaac10b0..eb1ae77f411a 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -1067,8 +1067,8 @@ void nfs_inode_attach_open_context(struct nfs_open_context *ctx) spin_lock(&inode->i_lock); if (list_empty(&nfsi->open_files) && (nfsi->cache_validity & NFS_INO_DATA_INVAL_DEFER)) - nfsi->cache_validity |= NFS_INO_INVALID_DATA | - NFS_INO_REVAL_FORCED; + nfs_set_cache_invalid(inode, NFS_INO_INVALID_DATA | + NFS_INO_REVAL_FORCED); list_add_tail_rcu(&ctx->list, &nfsi->open_files); spin_unlock(&inode->i_lock); } |