Add SMB2.02 dialect support
[deliverable/linux.git] / fs / cifs / smb2ops.c
index 4d9dbe0b7385646f2db0dbc223ae83da60d14171..ad4d96a4bff5c61f02e46005aabc9773e62de2a0 100644 (file)
@@ -262,23 +262,6 @@ smb2_query_file_info(const unsigned int xid, struct cifs_tcon *tcon,
        return rc;
 }
 
-static char *
-smb2_build_path_to_root(struct smb_vol *vol, struct cifs_sb_info *cifs_sb,
-                       struct cifs_tcon *tcon)
-{
-       int pplen = vol->prepath ? strlen(vol->prepath) : 0;
-       char *full_path = NULL;
-
-       /* if no prefix path, simply set path to the root of share to "" */
-       if (pplen == 0) {
-               full_path = kzalloc(2, GFP_KERNEL);
-               return full_path;
-       }
-
-       cERROR(1, "prefixpath is not supported for SMB2 now");
-       return NULL;
-}
-
 static bool
 smb2_can_echo(struct TCP_Server_Info *server)
 {
@@ -613,7 +596,6 @@ struct smb_version_operations smb21_operations = {
        .set_path_size = smb2_set_path_size,
        .set_file_size = smb2_set_file_size,
        .set_file_info = smb2_set_file_info,
-       .build_path_to_root = smb2_build_path_to_root,
        .mkdir = smb2_mkdir,
        .mkdir_setinfo = smb2_mkdir_setinfo,
        .rmdir = smb2_rmdir,
@@ -643,6 +625,23 @@ struct smb_version_operations smb21_operations = {
        .new_lease_key = smb2_new_lease_key,
 };
 
+struct smb_version_values smb20_values = {
+       .version_string = SMB20_VERSION_STRING,
+       .protocol_id = SMB20_PROT_ID,
+       .req_capabilities = 0, /* MBZ */
+       .large_lock_type = 0,
+       .exclusive_lock_type = SMB2_LOCKFLAG_EXCLUSIVE_LOCK,
+       .shared_lock_type = SMB2_LOCKFLAG_SHARED_LOCK,
+       .unlock_lock_type = SMB2_LOCKFLAG_UNLOCK,
+       .header_size = sizeof(struct smb2_hdr),
+       .max_header_size = MAX_SMB2_HDR_SIZE,
+       .read_rsp_size = sizeof(struct smb2_read_rsp) - 1,
+       .lock_cmd = SMB2_LOCK,
+       .cap_unix = 0,
+       .cap_nt_find = SMB2_NT_FIND,
+       .cap_large_files = SMB2_LARGE_FILES,
+};
+
 struct smb_version_values smb21_values = {
        .version_string = SMB21_VERSION_STRING,
        .protocol_id = SMB21_PROT_ID,
This page took 0.025773 seconds and 5 git commands to generate.