summaryrefslogtreecommitdiff
path: root/fs/nfs/delegation.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2022-11-16 17:55:36 +0300
committerJeff Layton <jlayton@kernel.org>2022-11-30 13:08:10 +0300
commit17b985def2a859d66d27afee442147468a6a4ea6 (patch)
tree154c88c226a8edb3b61506296725abfd897b5ac8 /fs/nfs/delegation.c
parent98b41ffe0afdfeaa1439a5d6bd2db4a94277e31b (diff)
downloadlinux-17b985def2a859d66d27afee442147468a6a4ea6.tar.xz
nfs: use locks_inode_context helper
nfs currently doesn't access i_flctx safely. This requires a smp_load_acquire, as the pointer is set via cmpxchg (a release operation). Cc: Trond Myklebust <trond.myklebust@hammerspace.com> Cc: Anna Schumaker <anna@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jeff Layton <jlayton@kernel.org>
Diffstat (limited to 'fs/nfs/delegation.c')
-rw-r--r--fs/nfs/delegation.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index ead8a0e06abf..cf7365581031 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -146,7 +146,7 @@ static int nfs_delegation_claim_locks(struct nfs4_state *state, const nfs4_state
{
struct inode *inode = state->inode;
struct file_lock *fl;
- struct file_lock_context *flctx = inode->i_flctx;
+ struct file_lock_context *flctx = locks_inode_context(inode);
struct list_head *list;
int status = 0;