]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ksmbd: use F_SETLK when unlocking a file
authorJeff Layton <jlayton@kernel.org>
Mon, 18 Dec 2023 15:33:26 +0000 (00:33 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Dec 2023 09:41:53 +0000 (10:41 +0100)
commit9ea6b43d8a7d7f3d90779787a3ee77e5e95a87a8
treef58a368c3d9dfbf49b47d1b112d4b795924c5e30
parent8263acd267f76170c170099c9cb3cd8861a48e7f
ksmbd: use F_SETLK when unlocking a file

[ Upstream commit 7ecbe92696bb7fe32c80b6cf64736a0d157717a9 ]

ksmbd seems to be trying to use a cmd value of 0 when unlocking a file.
That activity requires a type of F_UNLCK with a cmd of F_SETLK. For
local POSIX locking, it doesn't matter much since vfs_lock_file ignores
@cmd, but filesystems that define their own ->lock operation expect to
see it set sanely.

Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: David Howells <dhowells@redhat.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ksmbd/smb2pdu.c