]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
smb: common: add SMB3_COMPRESS_MAX_ALGS
authorEnzo Matsumiya <ematsumiya@suse.de>
Mon, 13 Apr 2026 19:07:13 +0000 (16:07 -0300)
committerSteve French <stfrench@microsoft.com>
Wed, 22 Apr 2026 14:55:56 +0000 (09:55 -0500)
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>
fs/smb/common/smb2pdu.h

index 85a4248d4f29d9bdc12d2a45c5b142d05874e16f..a4b12eb8df81ec7ab4e01462afdef5a2c140c36d 100644 (file)
@@ -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)