Skip to content

Commit 44ccf41

Browse files
ematsumiyasmfrench
authored andcommitted
smb: common: add SMB3_COMPRESS_MAX_ALGS
Set it to number of currently defined algorithms (6 as of now). Signed-off-by: Enzo Matsumiya <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 71179a5 commit 44ccf41

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

fs/smb/common/smb2pdu.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,8 @@ struct smb2_encryption_neg_context {
510510
/* Pattern scanning algorithm See MS-SMB2 3.1.4.4.1 */
511511
#define SMB3_COMPRESS_PATTERN cpu_to_le16(0x0004) /* Pattern_V1 */
512512
#define SMB3_COMPRESS_LZ4 cpu_to_le16(0x0005)
513+
/* Account for NONE for easier array indexing */
514+
#define SMB3_COMPRESS_MAX_ALGS 6
513515

514516
/* Compression Flags */
515517
#define SMB2_COMPRESSION_CAPABILITIES_FLAG_NONE cpu_to_le32(0x00000000)

0 commit comments

Comments
 (0)