aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ksmbd/smb2pdu.c
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2022-03-26 12:47:57 -0500
committerSteve French <stfrench@microsoft.com>2022-03-26 23:09:20 -0500
commit15e7b6d753b815b19b375dcd4593534c0f157c66 (patch)
treeae2537f896a392b33de75b5ef33c7b2f8ca28a3c /fs/ksmbd/smb2pdu.c
parent[smb3] move more common protocol header definitions to smbfs_common (diff)
downloadlinux-dev-15e7b6d753b815b19b375dcd4593534c0f157c66.tar.xz
linux-dev-15e7b6d753b815b19b375dcd4593534c0f157c66.zip
smb3: move defines for ioctl protocol header and SMB2 sizes to smbfs_common
The definitions for the ioctl SMB3 request and response as well as length of various fields defined in the protocol documentation were duplicated in fs/ksmbd and fs/cifs. Move these to the common code in fs/smbfs_common/smb2pdu.h Reviewed-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/ksmbd/smb2pdu.c')
-rw-r--r--fs/ksmbd/smb2pdu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ksmbd/smb2pdu.c b/fs/ksmbd/smb2pdu.c
index 5440d61cea9f..e7eb835648f8 100644
--- a/fs/ksmbd/smb2pdu.c
+++ b/fs/ksmbd/smb2pdu.c
@@ -7581,7 +7581,7 @@ int smb2_ioctl(struct ksmbd_work *work)
goto out;
}
- cnt_code = le32_to_cpu(req->CntCode);
+ cnt_code = le32_to_cpu(req->CtlCode);
ret = smb2_calc_max_out_buf_len(work, 48,
le32_to_cpu(req->MaxOutputResponse));
if (ret < 0) {
@@ -7687,7 +7687,7 @@ int smb2_ioctl(struct ksmbd_work *work)
rsp->PersistentFileId = req->PersistentFileId;
fsctl_copychunk(work,
(struct copychunk_ioctl_req *)&req->Buffer[0],
- le32_to_cpu(req->CntCode),
+ le32_to_cpu(req->CtlCode),
le32_to_cpu(req->InputCount),
req->VolatileFileId,
req->PersistentFileId,
@@ -7841,7 +7841,7 @@ dup_ext_out:
goto out;
}
- rsp->CntCode = cpu_to_le32(cnt_code);
+ rsp->CtlCode = cpu_to_le32(cnt_code);
rsp->InputCount = cpu_to_le32(0);
rsp->InputOffset = cpu_to_le32(112);
rsp->OutputOffset = cpu_to_le32(112);