diff options
Diffstat (limited to 'fs/cifs/smb1ops.c')
-rw-r--r-- | fs/cifs/smb1ops.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c index 3668e81a9d81..daa2edec391e 100644 --- a/fs/cifs/smb1ops.c +++ b/fs/cifs/smb1ops.c | |||
@@ -66,11 +66,29 @@ cifs_compare_fids(struct cifsFileInfo *ob1, struct cifsFileInfo *ob2) | |||
66 | return ob1->netfid == ob2->netfid; | 66 | return ob1->netfid == ob2->netfid; |
67 | } | 67 | } |
68 | 68 | ||
69 | static unsigned int | ||
70 | cifs_read_data_offset(char *buf) | ||
71 | { | ||
72 | READ_RSP *rsp = (READ_RSP *)buf; | ||
73 | return le16_to_cpu(rsp->DataOffset); | ||
74 | } | ||
75 | |||
76 | static unsigned int | ||
77 | cifs_read_data_length(char *buf) | ||
78 | { | ||
79 | READ_RSP *rsp = (READ_RSP *)buf; | ||
80 | return (le16_to_cpu(rsp->DataLengthHigh) << 16) + | ||
81 | le16_to_cpu(rsp->DataLength); | ||
82 | } | ||
83 | |||
69 | struct smb_version_operations smb1_operations = { | 84 | struct smb_version_operations smb1_operations = { |
70 | .send_cancel = send_nt_cancel, | 85 | .send_cancel = send_nt_cancel, |
71 | .compare_fids = cifs_compare_fids, | 86 | .compare_fids = cifs_compare_fids, |
72 | .setup_request = cifs_setup_request, | 87 | .setup_request = cifs_setup_request, |
73 | .check_receive = cifs_check_receive, | 88 | .check_receive = cifs_check_receive, |
89 | .read_data_offset = cifs_read_data_offset, | ||
90 | .read_data_length = cifs_read_data_length, | ||
91 | .map_error = map_smb_to_linux_error, | ||
74 | }; | 92 | }; |
75 | 93 | ||
76 | struct smb_version_values smb1_values = { | 94 | struct smb_version_values smb1_values = { |
@@ -81,4 +99,5 @@ struct smb_version_values smb1_values = { | |||
81 | .unlock_lock_type = 0, | 99 | .unlock_lock_type = 0, |
82 | .header_size = sizeof(struct smb_hdr), | 100 | .header_size = sizeof(struct smb_hdr), |
83 | .max_header_size = MAX_CIFS_HDR_SIZE, | 101 | .max_header_size = MAX_CIFS_HDR_SIZE, |
102 | .read_rsp_size = sizeof(READ_RSP), | ||
84 | }; | 103 | }; |