diff options
author | Jeff Layton <jlayton@kernel.org> | 2022-11-16 16:50:52 +0300 |
---|---|---|
committer | Jeff Layton <jlayton@kernel.org> | 2022-11-30 13:08:10 +0300 |
commit | 87f00aba211ef7308fd6c5d47d646a70bf196662 (patch) | |
tree | 75daa78b674d2a9402cf40033dd235d923222722 /fs | |
parent | a1fde8ee771f92d2a8bbd79532149ddd34546bc1 (diff) | |
download | linux-87f00aba211ef7308fd6c5d47d646a70bf196662.tar.xz |
ksmbd: use locks_inode_context helper
ksmbd 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 <sfrench@samba.org>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ksmbd/vfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ksmbd/vfs.c b/fs/ksmbd/vfs.c index 8de970d6146f..f9e85d6a160e 100644 --- a/fs/ksmbd/vfs.c +++ b/fs/ksmbd/vfs.c @@ -321,7 +321,7 @@ static int check_lock_range(struct file *filp, loff_t start, loff_t end, unsigned char type) { struct file_lock *flock; - struct file_lock_context *ctx = file_inode(filp)->i_flctx; + struct file_lock_context *ctx = locks_inode_context(file_inode(filp)); int error = 0; if (!ctx || list_empty_careful(&ctx->flc_posix)) |