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