@@ -280,20 +280,6 @@ static const match_table_t cifs_mount_option_tokens = {
280280 { Opt_err , NULL }
281281};
282282
283- static const match_table_t cifs_smb_version_tokens = {
284- { Smb_1 , SMB1_VERSION_STRING },
285- { Smb_20 , SMB20_VERSION_STRING },
286- { Smb_21 , SMB21_VERSION_STRING },
287- { Smb_30 , SMB30_VERSION_STRING },
288- { Smb_302 , SMB302_VERSION_STRING },
289- { Smb_302 , ALT_SMB302_VERSION_STRING },
290- { Smb_311 , SMB311_VERSION_STRING },
291- { Smb_311 , ALT_SMB311_VERSION_STRING },
292- { Smb_3any , SMB3ANY_VERSION_STRING },
293- { Smb_default , SMBDEFAULT_VERSION_STRING },
294- { Smb_version_err , NULL }
295- };
296-
297283static int ip_connect (struct TCP_Server_Info * server );
298284static int generic_ip_connect (struct TCP_Server_Info * server );
299285static void tlink_rb_insert (struct rb_root * root , struct tcon_link * new_tlink );
@@ -1327,77 +1313,6 @@ static int get_option_gid(substring_t args[], kgid_t *result)
13271313 return 0 ;
13281314}
13291315
1330- static int
1331- cifs_parse_smb_version (char * value , struct smb_vol * vol , bool is_smb3 )
1332- {
1333- substring_t args [MAX_OPT_ARGS ];
1334-
1335- switch (match_token (value , cifs_smb_version_tokens , args )) {
1336- #ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
1337- case Smb_1 :
1338- if (disable_legacy_dialects ) {
1339- cifs_dbg (VFS , "mount with legacy dialect disabled\n" );
1340- return 1 ;
1341- }
1342- if (is_smb3 ) {
1343- cifs_dbg (VFS , "vers=1.0 (cifs) not permitted when mounting with smb3\n" );
1344- return 1 ;
1345- }
1346- cifs_dbg (VFS , "Use of the less secure dialect vers=1.0 is not recommended unless required for access to very old servers\n" );
1347- vol -> ops = & smb1_operations ;
1348- vol -> vals = & smb1_values ;
1349- break ;
1350- case Smb_20 :
1351- if (disable_legacy_dialects ) {
1352- cifs_dbg (VFS , "mount with legacy dialect disabled\n" );
1353- return 1 ;
1354- }
1355- if (is_smb3 ) {
1356- cifs_dbg (VFS , "vers=2.0 not permitted when mounting with smb3\n" );
1357- return 1 ;
1358- }
1359- vol -> ops = & smb20_operations ;
1360- vol -> vals = & smb20_values ;
1361- break ;
1362- #else
1363- case Smb_1 :
1364- cifs_dbg (VFS , "vers=1.0 (cifs) mount not permitted when legacy dialects disabled\n" );
1365- return 1 ;
1366- case Smb_20 :
1367- cifs_dbg (VFS , "vers=2.0 mount not permitted when legacy dialects disabled\n" );
1368- return 1 ;
1369- #endif /* CIFS_ALLOW_INSECURE_LEGACY */
1370- case Smb_21 :
1371- vol -> ops = & smb21_operations ;
1372- vol -> vals = & smb21_values ;
1373- break ;
1374- case Smb_30 :
1375- vol -> ops = & smb30_operations ;
1376- vol -> vals = & smb30_values ;
1377- break ;
1378- case Smb_302 :
1379- vol -> ops = & smb30_operations ; /* currently identical with 3.0 */
1380- vol -> vals = & smb302_values ;
1381- break ;
1382- case Smb_311 :
1383- vol -> ops = & smb311_operations ;
1384- vol -> vals = & smb311_values ;
1385- break ;
1386- case Smb_3any :
1387- vol -> ops = & smb30_operations ; /* currently identical with 3.0 */
1388- vol -> vals = & smb3any_values ;
1389- break ;
1390- case Smb_default :
1391- vol -> ops = & smb30_operations ; /* currently identical with 3.0 */
1392- vol -> vals = & smbdefault_values ;
1393- break ;
1394- default :
1395- cifs_dbg (VFS , "Unknown vers= option specified: %s\n" , value );
1396- return 1 ;
1397- }
1398- return 0 ;
1399- }
1400-
14011316/*
14021317 * Parse a devname into substrings and populate the vol->UNC and vol->prepath
14031318 * fields with the result. Returns 0 on success and an error otherwise.
0 commit comments