Commit d1a30b9d authored by ChenXiaoSong's avatar ChenXiaoSong Committed by Steve French
Browse files

smb/server: fix return value of smb2_notify()



smb2_notify() should return error code when an error occurs,
__process_request() will print the error messages.

I may implement the SMB2 CHANGE_NOTIFY response (see MS-SMB2 2.2.36)
in the future.

Signed-off-by: default avatarChenXiaoSong <chenxiaosong@kylinos.cn>
Acked-by: default avatarNamjae Jeon <linkinjeon@kernel.org>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent c5b462e3
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -8777,7 +8777,7 @@ int smb2_oplock_break(struct ksmbd_work *work)
 * smb2_notify() - handler for smb2 notify request
 * @work:   smb work containing notify command buffer
 *
 * Return:      0
 * Return:      0 on success, otherwise error
 */
int smb2_notify(struct ksmbd_work *work)
{
@@ -8791,12 +8791,12 @@ int smb2_notify(struct ksmbd_work *work)
	if (work->next_smb2_rcv_hdr_off && req->hdr.NextCommand) {
		rsp->hdr.Status = STATUS_INTERNAL_ERROR;
		smb2_set_err_rsp(work);
		return 0;
		return -EIO;
	}

	smb2_set_err_rsp(work);
	rsp->hdr.Status = STATUS_NOT_IMPLEMENTED;
	return 0;
	return -EOPNOTSUPP;
}

/**