diff options
author | Jeff Layton <[email protected]> | 2022-11-16 08:49:25 -0500 |
---|---|---|
committer | Jeff Layton <[email protected]> | 2022-11-30 05:08:10 -0500 |
commit | a1fde8ee771f92d2a8bbd79532149ddd34546bc1 (patch) | |
tree | 73b049051cb93059da0ae74f2f8b3a513097f6a4 | |
parent | d4e78663f6bc83db44041f224e58e0940662a912 (diff) |
cifs: use locks_inode_context helper
cifs currently doesn't access i_flctx safely. This requires a
smp_load_acquire, as the pointer is set via cmpxchg (a release
operation).
Cc: Steve French <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Jeff Layton <[email protected]>
-rw-r--r-- | fs/cifs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index cd9698209930..6c1431979495 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -1413,7 +1413,7 @@ cifs_push_posix_locks(struct cifsFileInfo *cfile) struct inode *inode = d_inode(cfile->dentry); struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); struct file_lock *flock; - struct file_lock_context *flctx = inode->i_flctx; + struct file_lock_context *flctx = locks_inode_context(inode); unsigned int count = 0, i; int rc = 0, xid, type; struct list_head locks_to_send, *el; |