aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/cifs/connect.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 0ea52e9f9065..5f68b968faa7 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -400,7 +400,9 @@ incomplete_rcv:
400 cFYI(1, "call to reconnect done"); 400 cFYI(1, "call to reconnect done");
401 csocket = server->ssocket; 401 csocket = server->ssocket;
402 continue; 402 continue;
403 } else if ((length == -ERESTARTSYS) || (length == -EAGAIN)) { 403 } else if (length == -ERESTARTSYS ||
404 length == -EAGAIN ||
405 length == -EINTR) {
404 msleep(1); /* minimum sleep to prevent looping 406 msleep(1); /* minimum sleep to prevent looping
405 allowing socket to clear and app threads to set 407 allowing socket to clear and app threads to set
406 tcpStatus CifsNeedReconnect if server hung */ 408 tcpStatus CifsNeedReconnect if server hung */
@@ -422,10 +424,6 @@ incomplete_rcv:
422 and so simply return error to mount */ 424 and so simply return error to mount */
423 break; 425 break;
424 } 426 }
425 if (!try_to_freeze() && (length == -EINTR)) {
426 cFYI(1, "cifsd thread killed");
427 break;
428 }
429 cFYI(1, "Reconnect after unexpected peek error %d", 427 cFYI(1, "Reconnect after unexpected peek error %d",
430 length); 428 length);
431 cifs_reconnect(server); 429 cifs_reconnect(server);
@@ -522,8 +520,7 @@ incomplete_rcv:
522 total_read += length) { 520 total_read += length) {
523 length = kernel_recvmsg(csocket, &smb_msg, &iov, 1, 521 length = kernel_recvmsg(csocket, &smb_msg, &iov, 1,
524 pdu_length - total_read, 0); 522 pdu_length - total_read, 0);
525 if ((server->tcpStatus == CifsExiting) || 523 if (server->tcpStatus == CifsExiting) {
526 (length == -EINTR)) {
527 /* then will exit */ 524 /* then will exit */
528 reconnect = 2; 525 reconnect = 2;
529 break; 526 break;
@@ -534,8 +531,9 @@ incomplete_rcv:
534 /* Now we will reread sock */ 531 /* Now we will reread sock */
535 reconnect = 1; 532 reconnect = 1;
536 break; 533 break;
537 } else if ((length == -ERESTARTSYS) || 534 } else if (length == -ERESTARTSYS ||
538 (length == -EAGAIN)) { 535 length == -EAGAIN ||
536 length == -EINTR) {
539 msleep(1); /* minimum sleep to prevent looping, 537 msleep(1); /* minimum sleep to prevent looping,
540 allowing socket to clear and app 538 allowing socket to clear and app
541 threads to set tcpStatus 539 threads to set tcpStatus