summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnzo Matsumiya <ematsumiya@suse.de>2026-04-13 22:07:13 +0300
committerSteve French <stfrench@microsoft.com>2026-04-22 17:55:56 +0300
commit44ccf4162adc8a33520112be598a6fba5b318e51 (patch)
tree51bc7686f70b5d0d81005e9020325414b6dc9739
parent71179a5ee916d6168bdf71e3533f71c36e5ab32c (diff)
downloadlinux-44ccf4162adc8a33520112be598a6fba5b318e51.tar.xz
smb: common: add SMB3_COMPRESS_MAX_ALGS
Set it to number of currently defined algorithms (6 as of now). Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de> Signed-off-by: Steve French <stfrench@microsoft.com>
-rw-r--r--fs/smb/common/smb2pdu.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/smb/common/smb2pdu.h b/fs/smb/common/smb2pdu.h
index 85a4248d4f29..a4b12eb8df81 100644
--- a/fs/smb/common/smb2pdu.h
+++ b/fs/smb/common/smb2pdu.h
@@ -510,6 +510,8 @@ struct smb2_encryption_neg_context {
/* Pattern scanning algorithm See MS-SMB2 3.1.4.4.1 */
#define SMB3_COMPRESS_PATTERN cpu_to_le16(0x0004) /* Pattern_V1 */
#define SMB3_COMPRESS_LZ4 cpu_to_le16(0x0005)
+/* Account for NONE for easier array indexing */
+#define SMB3_COMPRESS_MAX_ALGS 6
/* Compression Flags */
#define SMB2_COMPRESSION_CAPABILITIES_FLAG_NONE cpu_to_le32(0x00000000)