Skip to content

Commit 2fe187d

Browse files
committed
smb3: move some common open context structs to smbfs_common
create durable and create durable reconnect context and the maximal access create context struct definitions can be put in common code in smbfs_common Reviewed-by: Paulo Alcantara (SUSE) <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 1149c84 commit 2fe187d

File tree

3 files changed

+28
-36
lines changed

3 files changed

+28
-36
lines changed

fs/cifs/smb2pdu.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -132,17 +132,6 @@ struct share_redirect_error_context_rsp {
132132
#define SMB2_LEASE_HANDLE_CACHING_HE 0x02
133133
#define SMB2_LEASE_WRITE_CACHING_HE 0x04
134134

135-
struct create_durable {
136-
struct create_context ccontext;
137-
__u8 Name[8];
138-
union {
139-
__u8 Reserved[16];
140-
struct {
141-
__u64 PersistentFileId;
142-
__u64 VolatileFileId;
143-
} Fid;
144-
} Data;
145-
} __packed;
146135

147136
/* See MS-SMB2 2.2.13.2.11 */
148137
/* Flags */

fs/ksmbd/smb2pdu.h

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,6 @@ struct create_durable_req_v2 {
7070
__u8 CreateGuid[16];
7171
} __packed;
7272

73-
struct create_durable_reconn_req {
74-
struct create_context ccontext;
75-
__u8 Name[8];
76-
union {
77-
__u8 Reserved[16];
78-
struct {
79-
__u64 PersistentFileId;
80-
__u64 VolatileFileId;
81-
} Fid;
82-
} Data;
83-
} __packed;
84-
8573
struct create_durable_reconn_v2_req {
8674
struct create_context ccontext;
8775
__u8 Name[8];
@@ -109,12 +97,6 @@ struct create_app_inst_id_vers {
10997
__le64 AppInstanceVersionLow;
11098
} __packed;
11199

112-
struct create_mxac_req {
113-
struct create_context ccontext;
114-
__u8 Name[8];
115-
__le64 Timestamp;
116-
} __packed;
117-
118100
struct create_alloc_size_req {
119101
struct create_context ccontext;
120102
__u8 Name[8];
@@ -137,13 +119,6 @@ struct create_durable_v2_rsp {
137119
__le32 Flags;
138120
} __packed;
139121

140-
struct create_mxac_rsp {
141-
struct create_context ccontext;
142-
__u8 Name[8];
143-
__le32 QueryStatus;
144-
__le32 MaximalAccess;
145-
} __packed;
146-
147122
/* equivalent of the contents of SMB3.1.1 POSIX open context response */
148123
struct create_posix_rsp {
149124
struct create_context ccontext;

fs/smbfs_common/smb2pdu.h

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,34 @@ struct create_posix {
11721172
__u32 Reserved;
11731173
} __packed;
11741174

1175+
/* See MS-SMB2 2.2.13.2.3 and MS-SMB2 2.2.13.2.4 */
1176+
struct create_durable {
1177+
struct create_context ccontext;
1178+
__u8 Name[8];
1179+
union {
1180+
__u8 Reserved[16];
1181+
struct {
1182+
__u64 PersistentFileId;
1183+
__u64 VolatileFileId;
1184+
} Fid;
1185+
} Data;
1186+
} __packed;
1187+
1188+
/* See MS-SMB2 2.2.13.2.5 */
1189+
struct create_mxac_req {
1190+
struct create_context ccontext;
1191+
__u8 Name[8];
1192+
__le64 Timestamp;
1193+
} __packed;
1194+
1195+
/* See MS-SMB2 2.2.14.2.5 */
1196+
struct create_mxac_rsp {
1197+
struct create_context ccontext;
1198+
__u8 Name[8];
1199+
__le32 QueryStatus;
1200+
__le32 MaximalAccess;
1201+
} __packed;
1202+
11751203
#define SMB2_LEASE_NONE_LE cpu_to_le32(0x00)
11761204
#define SMB2_LEASE_READ_CACHING_LE cpu_to_le32(0x01)
11771205
#define SMB2_LEASE_HANDLE_CACHING_LE cpu_to_le32(0x02)

0 commit comments

Comments
 (0)