aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ksmbd/smb2pdu.h
diff options
context:
space:
mode:
authorPaulo Alcantara <pc@cjr.nz>2022-03-21 13:08:26 -0300
committerSteve French <stfrench@microsoft.com>2022-03-23 15:20:15 -0500
commit2d004c6cae567e33ab2e197757181c72a322451f (patch)
treef3bd87cef5888c88d417661ca6049850acd3de3c /fs/ksmbd/smb2pdu.h
parentcifs: fix bad fids sent over wire (diff)
downloadlinux-dev-2d004c6cae567e33ab2e197757181c72a322451f.tar.xz
linux-dev-2d004c6cae567e33ab2e197757181c72a322451f.zip
ksmbd: store fids as opaque u64 integers
There is no need to store the fids as le64 integers as they are opaque to the client and only used for equality. Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz> Reviewed-by: Tom Talpey <tom@talpey.com> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to '')
-rw-r--r--fs/ksmbd/smb2pdu.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/fs/ksmbd/smb2pdu.h b/fs/ksmbd/smb2pdu.h
index 725b800c29c8..fd3df8b71687 100644
--- a/fs/ksmbd/smb2pdu.h
+++ b/fs/ksmbd/smb2pdu.h
@@ -116,8 +116,8 @@ struct create_durable_reconn_req {
union {
__u8 Reserved[16];
struct {
- __le64 PersistentFileId;
- __le64 VolatileFileId;
+ __u64 PersistentFileId;
+ __u64 VolatileFileId;
} Fid;
} Data;
} __packed;
@@ -126,8 +126,8 @@ struct create_durable_reconn_v2_req {
struct create_context ccontext;
__u8 Name[8];
struct {
- __le64 PersistentFileId;
- __le64 VolatileFileId;
+ __u64 PersistentFileId;
+ __u64 VolatileFileId;
} Fid;
__u8 CreateGuid[16];
__le32 Flags;
@@ -269,8 +269,8 @@ struct smb2_ioctl_req {
__le16 StructureSize; /* Must be 57 */
__le16 Reserved; /* offset from start of SMB2 header to write data */
__le32 CntCode;
- __le64 PersistentFileId;
- __le64 VolatileFileId;
+ __u64 PersistentFileId;
+ __u64 VolatileFileId;
__le32 InputOffset; /* Reserved MBZ */
__le32 InputCount;
__le32 MaxInputResponse;
@@ -287,8 +287,8 @@ struct smb2_ioctl_rsp {
__le16 StructureSize; /* Must be 49 */
__le16 Reserved; /* offset from start of SMB2 header to write data */
__le32 CntCode;
- __le64 PersistentFileId;
- __le64 VolatileFileId;
+ __u64 PersistentFileId;
+ __u64 VolatileFileId;
__le32 InputOffset; /* Reserved MBZ */
__le32 InputCount;
__le32 OutputOffset;
@@ -357,7 +357,7 @@ struct file_object_buf_type1_ioctl_rsp {
} __packed;
struct resume_key_ioctl_rsp {
- __le64 ResumeKey[3];
+ __u64 ResumeKey[3];
__le32 ContextLength;
__u8 Context[4]; /* ignored, Windows sets to 4 bytes of zero */
} __packed;
@@ -432,8 +432,8 @@ struct smb2_lock_req {
__le16 StructureSize; /* Must be 48 */
__le16 LockCount;
__le32 Reserved;
- __le64 PersistentFileId;
- __le64 VolatileFileId;
+ __u64 PersistentFileId;
+ __u64 VolatileFileId;
/* Followed by at least one */
struct smb2_lock_element locks[1];
} __packed;
@@ -468,8 +468,8 @@ struct smb2_query_directory_req {
__u8 FileInformationClass;
__u8 Flags;
__le32 FileIndex;
- __le64 PersistentFileId;
- __le64 VolatileFileId;
+ __u64 PersistentFileId;
+ __u64 VolatileFileId;
__le16 FileNameOffset;
__le16 FileNameLength;
__le32 OutputBufferLength;
@@ -515,8 +515,8 @@ struct smb2_query_info_req {
__le32 InputBufferLength;
__le32 AdditionalInformation;
__le32 Flags;
- __le64 PersistentFileId;
- __le64 VolatileFileId;
+ __u64 PersistentFileId;
+ __u64 VolatileFileId;
__u8 Buffer[1];
} __packed;
@@ -537,8 +537,8 @@ struct smb2_set_info_req {
__le16 BufferOffset;
__u16 Reserved;
__le32 AdditionalInformation;
- __le64 PersistentFileId;
- __le64 VolatileFileId;
+ __u64 PersistentFileId;
+ __u64 VolatileFileId;
__u8 Buffer[1];
} __packed;