mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-19 05:51:36 -04:00
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>
This commit is contained in:
committed by
Steve French
parent
269df046c1
commit
a3c4445fdb
@@ -8748,7 +8748,7 @@ static void smb21_lease_break_ack(struct ksmbd_work *work)
|
||||
* 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;
|
||||
|
||||
Reference in New Issue
Block a user