aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2ops.c
diff options
context:
space:
mode:
authorPavel Shilovsky <piastry@etersoft.ru>2011-12-26 13:53:34 -0500
committerSteve French <smfrench@gmail.com>2012-07-24 11:25:20 -0400
commit2dc7e1c03316940dec899fa3206a595de000e99b (patch)
treec74127806717b23e226b3ee81135d091d859bd7a /fs/cifs/smb2ops.c
parentddfbefbd393fb1a935bdf27cba5ad2eb24a76e75 (diff)
CIFS: Make transport routines work with SMB2
Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/smb2ops.c')
-rw-r--r--fs/cifs/smb2ops.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index f065e89756a1..09530f416123 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -18,10 +18,27 @@
18 */ 18 */
19 19
20#include "cifsglob.h" 20#include "cifsglob.h"
21#include "smb2pdu.h"
22#include "smb2proto.h"
23
24static __u64
25smb2_get_next_mid(struct TCP_Server_Info *server)
26{
27 __u64 mid;
28 /* for SMB2 we need the current value */
29 spin_lock(&GlobalMid_Lock);
30 mid = server->CurrentMid++;
31 spin_unlock(&GlobalMid_Lock);
32 return mid;
33}
21 34
22struct smb_version_operations smb21_operations = { 35struct smb_version_operations smb21_operations = {
36 .setup_request = smb2_setup_request,
37 .check_receive = smb2_check_receive,
38 .get_next_mid = smb2_get_next_mid,
23}; 39};
24 40
25struct smb_version_values smb21_values = { 41struct smb_version_values smb21_values = {
26 .version_string = SMB21_VERSION_STRING, 42 .version_string = SMB21_VERSION_STRING,
43 .lock_cmd = SMB2_LOCK,
27}; 44};