From e3ea9803870da173cf019abb58be5186989c064d Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Fri, 3 Sep 2010 12:00:49 -0400 Subject: [PATCH] --- yaml --- r: 210652 b: refs/heads/master c: 522bbe65a2415fabce618186fc7777eb4c502989 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/cifs/connect.c | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index e4267c835806..c6135e5854dc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4266d9118f85b050a341992f0cfab40d392ef32c +refs/heads/master: 522bbe65a2415fabce618186fc7777eb4c502989 diff --git a/trunk/fs/cifs/connect.c b/trunk/fs/cifs/connect.c index 0ea52e9f9065..5f68b968faa7 100644 --- a/trunk/fs/cifs/connect.c +++ b/trunk/fs/cifs/connect.c @@ -400,7 +400,9 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) cFYI(1, "call to reconnect done"); csocket = server->ssocket; continue; - } else if ((length == -ERESTARTSYS) || (length == -EAGAIN)) { + } else if (length == -ERESTARTSYS || + length == -EAGAIN || + length == -EINTR) { msleep(1); /* minimum sleep to prevent looping allowing socket to clear and app threads to set tcpStatus CifsNeedReconnect if server hung */ @@ -422,10 +424,6 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) and so simply return error to mount */ break; } - if (!try_to_freeze() && (length == -EINTR)) { - cFYI(1, "cifsd thread killed"); - break; - } cFYI(1, "Reconnect after unexpected peek error %d", length); cifs_reconnect(server); @@ -522,8 +520,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) total_read += length) { length = kernel_recvmsg(csocket, &smb_msg, &iov, 1, pdu_length - total_read, 0); - if ((server->tcpStatus == CifsExiting) || - (length == -EINTR)) { + if (server->tcpStatus == CifsExiting) { /* then will exit */ reconnect = 2; break; @@ -534,8 +531,9 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) /* Now we will reread sock */ reconnect = 1; break; - } else if ((length == -ERESTARTSYS) || - (length == -EAGAIN)) { + } else if (length == -ERESTARTSYS || + length == -EAGAIN || + length == -EINTR) { msleep(1); /* minimum sleep to prevent looping, allowing socket to clear and app threads to set tcpStatus