@@ -1426,12 +1426,14 @@ static int refresh_tcon(struct cifs_ses **sessions, struct cifs_tcon *tcon, bool
1426
1426
struct TCP_Server_Info * server = tcon -> ses -> server ;
1427
1427
1428
1428
mutex_lock (& server -> refpath_lock );
1429
- if (strcasecmp (server -> leaf_fullpath , server -> origin_fullpath ))
1430
- __refresh_tcon (server -> leaf_fullpath + 1 , sessions , tcon , force_refresh );
1429
+ if (server -> origin_fullpath ) {
1430
+ if (server -> leaf_fullpath && strcasecmp (server -> leaf_fullpath ,
1431
+ server -> origin_fullpath ))
1432
+ __refresh_tcon (server -> leaf_fullpath + 1 , sessions , tcon , force_refresh );
1433
+ __refresh_tcon (server -> origin_fullpath + 1 , sessions , tcon , force_refresh );
1434
+ }
1431
1435
mutex_unlock (& server -> refpath_lock );
1432
1436
1433
- __refresh_tcon (server -> origin_fullpath + 1 , sessions , tcon , force_refresh );
1434
-
1435
1437
return 0 ;
1436
1438
}
1437
1439
@@ -1534,11 +1536,14 @@ static void refresh_mounts(struct cifs_ses **sessions)
1534
1536
list_del_init (& tcon -> ulist );
1535
1537
1536
1538
mutex_lock (& server -> refpath_lock );
1537
- if (strcasecmp (server -> leaf_fullpath , server -> origin_fullpath ))
1538
- __refresh_tcon (server -> leaf_fullpath + 1 , sessions , tcon , false);
1539
+ if (server -> origin_fullpath ) {
1540
+ if (server -> leaf_fullpath && strcasecmp (server -> leaf_fullpath ,
1541
+ server -> origin_fullpath ))
1542
+ __refresh_tcon (server -> leaf_fullpath + 1 , sessions , tcon , false);
1543
+ __refresh_tcon (server -> origin_fullpath + 1 , sessions , tcon , false);
1544
+ }
1539
1545
mutex_unlock (& server -> refpath_lock );
1540
1546
1541
- __refresh_tcon (server -> origin_fullpath + 1 , sessions , tcon , false);
1542
1547
cifs_put_tcon (tcon );
1543
1548
}
1544
1549
}
0 commit comments