|
@@ -379,6 +379,7 @@ cifs_reconnect(struct TCP_Server_Info *server)
|
|
|
try_to_freeze();
|
|
|
|
|
|
/* we should try only the port we connected to before */
|
|
|
+ mutex_lock(&server->srv_mutex);
|
|
|
rc = generic_ip_connect(server);
|
|
|
if (rc) {
|
|
|
cifs_dbg(FYI, "reconnect error %d\n", rc);
|
|
@@ -390,6 +391,7 @@ cifs_reconnect(struct TCP_Server_Info *server)
|
|
|
server->tcpStatus = CifsNeedNegotiate;
|
|
|
spin_unlock(&GlobalMid_Lock);
|
|
|
}
|
|
|
+ mutex_unlock(&server->srv_mutex);
|
|
|
} while (server->tcpStatus == CifsNeedReconnect);
|
|
|
|
|
|
return rc;
|