]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
smb: move some duplicate definitions to common/smb2pdu.h
authorZhangGuoDong <zhangguodong@kylinos.cn>
Sun, 2 Nov 2025 07:30:52 +0000 (15:30 +0800)
committerSteve French <stfrench@microsoft.com>
Mon, 1 Dec 2025 03:11:45 +0000 (21:11 -0600)
commit1172d8598499a006d172bb24bebaa3fdc99064a8
treed0c7819cb604fa2ddcf457f9d44e283311861908
parent96721fd292264d712b7b9a51752ab87de5035db4
smb: move some duplicate definitions to common/smb2pdu.h

In order to maintain the code more easily, move duplicate definitions to
common header file.

There are only 4 different definitions, the client uses cpu_to_le16()
but the server does not:

  - RSS_CAPABLE
  - RDMA_CAPABLE
  - INTERNETWORK
  - INTERNETWORKV6

The other definitions are exactly the same on both client and server.

The struct smb_hdr is defined in MS-CIFS and MS-SMB, but it's also used by
SMB2 and SMB3, so move it to the common smb2pdu.h.

Co-developed-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Signed-off-by: ZhangGuoDong <zhangguodong@kylinos.cn>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cifspdu.h
fs/smb/client/smb2pdu.h
fs/smb/common/smb2pdu.h
fs/smb/server/smb2pdu.c
fs/smb/server/smb2pdu.h
fs/smb/server/smb_common.h