diff options
| author | ChenXiaoSong <chenxiaosong@kylinos.cn> | 2025-10-17 18:46:08 +0800 |
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2025-11-30 21:11:43 -0600 |
| commit | d1a30b9ddc3d4c0e38666bd166d51863cb39f1c4 (patch) | |
| tree | f001c5fdfba0c6dcce402c2f50ef835c1daec601 | |
| parent | c5b462e35373a68a5a7954f5e00383998cc7fe92 (diff) | |
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: ChenXiaoSong <chenxiaosong@kylinos.cn>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
| -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 6a482e4c1d62..d676558f7bb6 100644 --- a/fs/smb/server/smb2pdu.c +++ b/fs/smb/server/smb2pdu.c @@ -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; } /** |