diff options
| author | ChenXiaoSong <chenxiaosong@kylinos.cn> | 2025-10-17 18:46:07 +0800 |
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2025-11-30 21:11:43 -0600 |
| commit | c5b462e35373a68a5a7954f5e00383998cc7fe92 (patch) | |
| tree | 7f64a431e1605159730507195d4a9d3b0f8ed39e /fs | |
| parent | 3a597e6e9701eb7af04864ffdc0a6a91bc8c6496 (diff) | |
smb/server: fix return value of smb2_read()
STATUS_END_OF_FILE maps to the linux error -ENODATA. Perhaps in the future
we can move client/smb2maperror.c into common/ and then call
map_smb2_to_linux_error() to get the linux error.
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')
| -rw-r--r-- | fs/smb/server/smb2pdu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c index 17ce41fb9995..6a482e4c1d62 100644 --- a/fs/smb/server/smb2pdu.c +++ b/fs/smb/server/smb2pdu.c @@ -6832,7 +6832,7 @@ int smb2_read(struct ksmbd_work *work) rsp->hdr.Status = STATUS_END_OF_FILE; smb2_set_err_rsp(work); ksmbd_fd_put(work, fp); - return 0; + return -ENODATA; } ksmbd_debug(SMB, "nbytes %zu, offset %lld mincount %zu\n", |