diff options
author | Pavel Shilovsky <piastry@etersoft.ru> | 2012-05-17 05:25:35 -0400 |
---|---|---|
committer | Pavel Shilovsky <pshilovsky@samba.org> | 2012-05-23 04:33:11 -0400 |
commit | 8aa26f3ed80ddbaf78804b6481fcfdbd447caa1c (patch) | |
tree | 7c0a61eb9711dd93bb5eda33d875fbdd7c20a0e4 /fs/cifs/smb1ops.c | |
parent | eb37871118abfc30629ee2bef11013eddb42c756 (diff) |
CIFS: Move protocol specific demultiplex thread calls to ops struct
Acked-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/smb1ops.c')
-rw-r--r-- | fs/cifs/smb1ops.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c index daa2edec391e..ddc8ca6c3090 100644 --- a/fs/cifs/smb1ops.c +++ b/fs/cifs/smb1ops.c | |||
@@ -81,6 +81,25 @@ cifs_read_data_length(char *buf) | |||
81 | le16_to_cpu(rsp->DataLength); | 81 | le16_to_cpu(rsp->DataLength); |
82 | } | 82 | } |
83 | 83 | ||
84 | static struct mid_q_entry * | ||
85 | cifs_find_mid(struct TCP_Server_Info *server, char *buffer) | ||
86 | { | ||
87 | struct smb_hdr *buf = (struct smb_hdr *)buffer; | ||
88 | struct mid_q_entry *mid; | ||
89 | |||
90 | spin_lock(&GlobalMid_Lock); | ||
91 | list_for_each_entry(mid, &server->pending_mid_q, qhead) { | ||
92 | if (mid->mid == buf->Mid && | ||
93 | mid->mid_state == MID_REQUEST_SUBMITTED && | ||
94 | le16_to_cpu(mid->command) == buf->Command) { | ||
95 | spin_unlock(&GlobalMid_Lock); | ||
96 | return mid; | ||
97 | } | ||
98 | } | ||
99 | spin_unlock(&GlobalMid_Lock); | ||
100 | return NULL; | ||
101 | } | ||
102 | |||
84 | struct smb_version_operations smb1_operations = { | 103 | struct smb_version_operations smb1_operations = { |
85 | .send_cancel = send_nt_cancel, | 104 | .send_cancel = send_nt_cancel, |
86 | .compare_fids = cifs_compare_fids, | 105 | .compare_fids = cifs_compare_fids, |
@@ -89,6 +108,10 @@ struct smb_version_operations smb1_operations = { | |||
89 | .read_data_offset = cifs_read_data_offset, | 108 | .read_data_offset = cifs_read_data_offset, |
90 | .read_data_length = cifs_read_data_length, | 109 | .read_data_length = cifs_read_data_length, |
91 | .map_error = map_smb_to_linux_error, | 110 | .map_error = map_smb_to_linux_error, |
111 | .find_mid = cifs_find_mid, | ||
112 | .check_message = checkSMB, | ||
113 | .dump_detail = cifs_dump_detail, | ||
114 | .is_oplock_break = is_valid_oplock_break, | ||
92 | }; | 115 | }; |
93 | 116 | ||
94 | struct smb_version_values smb1_values = { | 117 | struct smb_version_values smb1_values = { |