summaryrefslogtreecommitdiffstats
path: root/fs/ksmbd
diff options
context:
space:
mode:
authorNamjae Jeon <namjae.jeon@samsung.com>2021-07-16 07:51:30 +0200
committerNamjae Jeon <namjae.jeon@samsung.com>2021-07-19 09:19:58 +0200
commite4b60e92d4f878b774eca22fa4c00fa04f6354b4 (patch)
tree4b2ae3755c59d2877f97eae7cadf5b64b772fd1d /fs/ksmbd
parentksmbd: fix typo in comment (diff)
downloadlinux-e4b60e92d4f878b774eca22fa4c00fa04f6354b4.tar.xz
linux-e4b60e92d4f878b774eca22fa4c00fa04f6354b4.zip
ksmbd: fix wrong compression context size
Use smb2_compression_ctx instead of smb2_encryption_neg_context. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/ksmbd')
-rw-r--r--fs/ksmbd/smb2pdu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ksmbd/smb2pdu.c b/fs/ksmbd/smb2pdu.c
index c1a594599431..f9e6e2bd4cbf 100644
--- a/fs/ksmbd/smb2pdu.c
+++ b/fs/ksmbd/smb2pdu.c
@@ -924,7 +924,7 @@ static int decode_compress_ctxt(struct ksmbd_conn *conn,
* Return compression context size in request.
* So need to plus extra number of CompressionAlgorithms size.
*/
- return sizeof(struct smb2_encryption_neg_context) +
+ return sizeof(struct smb2_compression_ctx) +
((algo_cnt - 1) * 2);
}