|
@@ -152,7 +152,7 @@ cifs_reconnect(struct TCP_Server_Info *server)
|
|
|
mid_entry->callback(mid_entry);
|
|
|
}
|
|
|
|
|
|
- while (server->tcpStatus == CifsNeedReconnect) {
|
|
|
+ do {
|
|
|
try_to_freeze();
|
|
|
|
|
|
/* we should try only the port we connected to before */
|
|
@@ -167,7 +167,7 @@ cifs_reconnect(struct TCP_Server_Info *server)
|
|
|
server->tcpStatus = CifsNeedNegotiate;
|
|
|
spin_unlock(&GlobalMid_Lock);
|
|
|
}
|
|
|
- }
|
|
|
+ } while (server->tcpStatus == CifsNeedReconnect);
|
|
|
|
|
|
return rc;
|
|
|
}
|
|
@@ -3374,7 +3374,7 @@ int cifs_negotiate_protocol(unsigned int xid, struct cifs_ses *ses)
|
|
|
}
|
|
|
if (rc == 0) {
|
|
|
spin_lock(&GlobalMid_Lock);
|
|
|
- if (server->tcpStatus != CifsExiting)
|
|
|
+ if (server->tcpStatus == CifsNeedNegotiate)
|
|
|
server->tcpStatus = CifsGood;
|
|
|
else
|
|
|
rc = -EHOSTDOWN;
|