summaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2ops.c
diff options
context:
space:
mode:
authorPavel Shilovsky <piastry@etersoft.ru>2011-12-26 22:53:34 +0400
committerSteve French <smfrench@gmail.com>2012-07-24 10:25:20 -0500
commit2dc7e1c03316940dec899fa3206a595de000e99b (patch)
treec74127806717b23e226b3ee81135d091d859bd7a /fs/cifs/smb2ops.c
parentddfbefbd393fb1a935bdf27cba5ad2eb24a76e75 (diff)
downloadop-kernel-dev-2dc7e1c03316940dec899fa3206a595de000e99b.zip
op-kernel-dev-2dc7e1c03316940dec899fa3206a595de000e99b.tar.gz
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 f065e89..09530f4 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,
};
OpenPOWER on IntegriCloud