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

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: default avatarChenXiaoSong <chenxiaosong@kylinos.cn>
Acked-by: default avatarNamjae Jeon <linkinjeon@kernel.org>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 3a597e6e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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",