From 2dc7e1c03316940dec899fa3206a595de000e99b Mon Sep 17 00:00:00 2001 From: Pavel Shilovsky Date: Mon, 26 Dec 2011 22:53:34 +0400 Subject: CIFS: Make transport routines work with SMB2 Reviewed-by: Jeff Layton Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French --- fs/cifs/smb2ops.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'fs/cifs/smb2ops.c') 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 @@ */ #include "cifsglob.h" +#include "smb2pdu.h" +#include "smb2proto.h" + +static __u64 +smb2_get_next_mid(struct TCP_Server_Info *server) +{ + __u64 mid; + /* for SMB2 we need the current value */ + spin_lock(&GlobalMid_Lock); + mid = server->CurrentMid++; + spin_unlock(&GlobalMid_Lock); + return mid; +} struct smb_version_operations smb21_operations = { + .setup_request = smb2_setup_request, + .check_receive = smb2_check_receive, + .get_next_mid = smb2_get_next_mid, }; struct smb_version_values smb21_values = { .version_string = SMB21_VERSION_STRING, + .lock_cmd = SMB2_LOCK, }; -- cgit v1.2.3