summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4state.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2022-11-16 15:55:36 +0100
committerJeff Layton <jlayton@kernel.org>2022-11-30 11:08:10 +0100
commit17b985def2a859d66d27afee442147468a6a4ea6 (patch)
tree154c88c226a8edb3b61506296725abfd897b5ac8 /fs/nfs/nfs4state.c
parentlockd: use locks_inode_context helper (diff)
downloadlinux-17b985def2a859d66d27afee442147468a6a4ea6.tar.xz
linux-17b985def2a859d66d27afee442147468a6a4ea6.zip
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/nfs4state.c')
-rw-r--r--fs/nfs/nfs4state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index a2d2d5d1b088..dd18344648f3 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1501,7 +1501,7 @@ static int nfs4_reclaim_locks(struct nfs4_state *state, const struct nfs4_state_
struct file_lock *fl;
struct nfs4_lock_state *lsp;
int status = 0;
- struct file_lock_context *flctx = inode->i_flctx;
+ struct file_lock_context *flctx = locks_inode_context(inode);
struct list_head *list;
if (flctx == NULL)