@@ -1431,12 +1431,14 @@ static int refresh_tcon(struct cifs_ses **sessions, struct cifs_tcon *tcon, bool
1431
1431
struct TCP_Server_Info * server = tcon -> ses -> server ;
1432
1432
1433
1433
mutex_lock (& server -> refpath_lock );
1434
- if (strcasecmp (server -> leaf_fullpath , server -> origin_fullpath ))
1435
- __refresh_tcon (server -> leaf_fullpath + 1 , sessions , tcon , force_refresh );
1434
+ if (server -> origin_fullpath ) {
1435
+ if (server -> leaf_fullpath && strcasecmp (server -> leaf_fullpath ,
1436
+ server -> origin_fullpath ))
1437
+ __refresh_tcon (server -> leaf_fullpath + 1 , sessions , tcon , force_refresh );
1438
+ __refresh_tcon (server -> origin_fullpath + 1 , sessions , tcon , force_refresh );
1439
+ }
1436
1440
mutex_unlock (& server -> refpath_lock );
1437
1441
1438
- __refresh_tcon (server -> origin_fullpath + 1 , sessions , tcon , force_refresh );
1439
-
1440
1442
return 0 ;
1441
1443
}
1442
1444
@@ -1539,11 +1541,14 @@ static void refresh_mounts(struct cifs_ses **sessions)
1539
1541
list_del_init (& tcon -> ulist );
1540
1542
1541
1543
mutex_lock (& server -> refpath_lock );
1542
- if (strcasecmp (server -> leaf_fullpath , server -> origin_fullpath ))
1543
- __refresh_tcon (server -> leaf_fullpath + 1 , sessions , tcon , false);
1544
+ if (server -> origin_fullpath ) {
1545
+ if (server -> leaf_fullpath && strcasecmp (server -> leaf_fullpath ,
1546
+ server -> origin_fullpath ))
1547
+ __refresh_tcon (server -> leaf_fullpath + 1 , sessions , tcon , false);
1548
+ __refresh_tcon (server -> origin_fullpath + 1 , sessions , tcon , false);
1549
+ }
1544
1550
mutex_unlock (& server -> refpath_lock );
1545
1551
1546
- __refresh_tcon (server -> origin_fullpath + 1 , sessions , tcon , false);
1547
1552
cifs_put_tcon (tcon );
1548
1553
}
1549
1554
}
0 commit comments