]> Gentwo Git Trees - linux/.git/commit
smb: move create_durable_reconn to common/smb2pdu.h
authorChenXiaoSong <chenxiaosong@kylinos.cn>
Thu, 13 Nov 2025 13:32:51 +0000 (21:32 +0800)
committerSteve French <stfrench@microsoft.com>
Mon, 1 Dec 2025 03:11:45 +0000 (21:11 -0600)
commit5003ad718af7705d6a519445a897843fac88167a
tree8ad4b12d87b846244cefe673274d326a523c90a5
parente7e60e8bfcc5bfff0dc40a3b8ab275a4da6990a0
smb: move create_durable_reconn to common/smb2pdu.h

The fields in struct create_durable_reconn_req and struct create_durable
are exactly the same, so remove create_durable_reconn_req from server,
and use typedef to define both create_durable_req_t and
create_durable_reconn_t for a single struct.

Rename the following places:

  - struct create_durable -> create_durable_req_t
  - struct create_durable_reconn_req -> create_durable_reconn_t

The documentation references are:

  - SMB2_CREATE_DURABLE_HANDLE_REQUEST   in MS-SMB2 2.2.13.2.3
  - SMB2_CREATE_DURABLE_HANDLE_RECONNECT in MS-SMB2 2.2.13.2.4
  - SMB2_FILEID in MS-SMB2 2.2.14.1

Descriptions of the struct fields:

  - __u8  Reserved[16]: DurableRequest field of SMB2_CREATE_DURABLE_HANDLE_REQUEST.
                        A 16-byte field that MUST be reserved.
  - __u64 PersistentFileId: Persistent field of 2.2.14.1 SMB2_FILEID
  - __u64 VolatileFileId: Volatile field of 2.2.14.1 SMB2_FILEID
  - struct Fid: Data field of SMB2_CREATE_DURABLE_HANDLE_RECONNECT.
                An SMB2_FILEID structure, as specified in section 2.2.14.1.

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