diff options
author | Jeff Layton <jlayton@kernel.org> | 2024-02-01 00:01:56 +0100 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-02-05 13:11:37 +0100 |
commit | 6a277077ac5189d7633f8c57e153e0a73fab39d2 (patch) | |
tree | 8632cc9a8f6731f0ac08994e4725ac038baebf5e /fs/smb/server/smb2pdu.c | |
parent | smb/client: convert to using new filelock helpers (diff) | |
download | linux-6a277077ac5189d7633f8c57e153e0a73fab39d2.tar.xz linux-6a277077ac5189d7633f8c57e153e0a73fab39d2.zip |
smb/server: convert to using new filelock helpers
Convert to using the new file locking helper functions.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://lore.kernel.org/r/20240131-flsplit-v3-15-c6129007ee8d@kernel.org
Reviewed-by: NeilBrown <neilb@suse.de>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/smb/server/smb2pdu.c')
-rw-r--r-- | fs/smb/server/smb2pdu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c index ba7a72a6a4f4..e170b96d5ac0 100644 --- a/fs/smb/server/smb2pdu.c +++ b/fs/smb/server/smb2pdu.c @@ -6841,7 +6841,7 @@ static void smb2_remove_blocked_lock(void **argv) struct file_lock *flock = (struct file_lock *)argv[0]; ksmbd_vfs_posix_lock_unblock(flock); - wake_up(&flock->fl_wait); + locks_wake_up(flock); } static inline bool lock_defer_pending(struct file_lock *fl) @@ -6991,7 +6991,7 @@ int smb2_lock(struct ksmbd_work *work) file_inode(smb_lock->fl->fl_file)) continue; - if (smb_lock->fl->fl_type == F_UNLCK) { + if (lock_is_unlock(smb_lock->fl)) { if (cmp_lock->fl->fl_file == smb_lock->fl->fl_file && cmp_lock->start == smb_lock->start && cmp_lock->end == smb_lock->end && @@ -7051,7 +7051,7 @@ int smb2_lock(struct ksmbd_work *work) } up_read(&conn_list_lock); out_check_cl: - if (smb_lock->fl->fl_type == F_UNLCK && nolock) { + if (lock_is_unlock(smb_lock->fl) && nolock) { pr_err("Try to unlock nolocked range\n"); rsp->hdr.Status = STATUS_RANGE_NOT_LOCKED; goto out; |