summaryrefslogtreecommitdiff
path: root/fs/ksmbd
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-12-12 08:52:53 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2022-12-12 08:52:53 -0800
commit73fa58dca80293320f5cfeb06f5b2daeb8d97bd5 (patch)
tree6ce68c006a568e11c48882bbb8692b5b3187c730 /fs/ksmbd
parent7fc035058eab3a485060374d78012708524ca133 (diff)
parentf2f2494c8aa3cc317572c4674ef256005ebc092b (diff)
downloadlinux-rpi-73fa58dca80293320f5cfeb06f5b2daeb8d97bd5.tar.gz
linux-rpi-73fa58dca80293320f5cfeb06f5b2daeb8d97bd5.tar.bz2
linux-rpi-73fa58dca80293320f5cfeb06f5b2daeb8d97bd5.zip
Merge tag 'locks-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux
Pull file locking updates from Jeff Layton: "The main change here is to add the new locks_inode_context helper, and convert all of the places that dereference inode->i_flctx directly to use that instead. There is a new helper to indicate whether any locks are held on an inode. This is mostly for Ceph but may be usable elsewhere too. Andi Kleen requested that we print the PID when the LOCK_MAND warning fires, to help track down applications trying to use it. Finally, we added some new warnings to some of the file locking functions that fire when the ->fl_file and filp arguments differ. This helped us find some long-standing bugs in lockd. Patches for those are in Chuck Lever's tree and should be in his v6.2 PR. After that patch, people using NFSv2/v3 locking may see some warnings fire until those go in. Happy Holidays!" * tag 'locks-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: Add process name and pid to locks warning nfsd: use locks_inode_context helper nfs: use locks_inode_context helper lockd: use locks_inode_context helper ksmbd: use locks_inode_context helper cifs: use locks_inode_context helper ceph: use locks_inode_context helper filelock: add a new locks_inode_context accessor function filelock: new helper: vfs_inode_has_locks filelock: WARN_ON_ONCE when ->fl_file and filp don't match
Diffstat (limited to 'fs/ksmbd')
-rw-r--r--fs/ksmbd/vfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ksmbd/vfs.c b/fs/ksmbd/vfs.c
index 94b8ed4ef870..72e981c9a572 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))