summaryrefslogtreecommitdiff
path: root/fs/smb
diff options
context:
space:
mode:
authorChenXiaoSong <chenxiaosong@kylinos.cn>2025-10-17 18:46:11 +0800
committerSteve French <stfrench@microsoft.com>2025-11-30 21:11:43 -0600
commita3c4445fdbbb83aa94ea1778717ef57006164814 (patch)
tree43f06213d5abd6214e0d145ccfeeb55b9aa3cf71 /fs/smb
parent269df046c1e15ab34fa26fd90db9381f022a0963 (diff)
smb/server: fix return value of smb2_oplock_break()
smb2_oplock_break() should return error code when an error occurs, __process_request() will print the error messages. Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb')
-rw-r--r--fs/smb/server/smb2pdu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c
index 2e6f3d96d3e6..98d7f7259fe3 100644
--- a/fs/smb/server/smb2pdu.c
+++ b/fs/smb/server/smb2pdu.c
@@ -8748,7 +8748,7 @@ err_out:
* smb2_oplock_break() - dispatcher for smb2.0 and 2.1 oplock/lease break
* @work: smb work containing oplock/lease break command buffer
*
- * Return: 0
+ * Return: 0 on success, otherwise error
*/
int smb2_oplock_break(struct ksmbd_work *work)
{
@@ -8771,6 +8771,7 @@ int smb2_oplock_break(struct ksmbd_work *work)
le16_to_cpu(req->StructureSize));
rsp->hdr.Status = STATUS_INVALID_PARAMETER;
smb2_set_err_rsp(work);
+ return -EINVAL;
}
return 0;