aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/cifs/connect.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index d67c550c4980..37950c65453c 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -379,6 +379,7 @@ cifs_reconnect(struct TCP_Server_Info *server)
379 try_to_freeze(); 379 try_to_freeze();
380 380
381 /* we should try only the port we connected to before */ 381 /* we should try only the port we connected to before */
382 mutex_lock(&server->srv_mutex);
382 rc = generic_ip_connect(server); 383 rc = generic_ip_connect(server);
383 if (rc) { 384 if (rc) {
384 cifs_dbg(FYI, "reconnect error %d\n", rc); 385 cifs_dbg(FYI, "reconnect error %d\n", rc);
@@ -390,6 +391,7 @@ cifs_reconnect(struct TCP_Server_Info *server)
390 server->tcpStatus = CifsNeedNegotiate; 391 server->tcpStatus = CifsNeedNegotiate;
391 spin_unlock(&GlobalMid_Lock); 392 spin_unlock(&GlobalMid_Lock);
392 } 393 }
394 mutex_unlock(&server->srv_mutex);
393 } while (server->tcpStatus == CifsNeedReconnect); 395 } while (server->tcpStatus == CifsNeedReconnect);
394 396
395 return rc; 397 return rc;