diff options
Diffstat (limited to 'fs/cifs/transport.c')
-rw-r--r-- | fs/cifs/transport.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index 17ba329e2b3d..95e23ca670a8 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c | |||
@@ -444,8 +444,9 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses, | |||
444 | if(timeout != MAX_SCHEDULE_TIMEOUT) { | 444 | if(timeout != MAX_SCHEDULE_TIMEOUT) { |
445 | timeout += jiffies; | 445 | timeout += jiffies; |
446 | wait_event(ses->server->response_q, | 446 | wait_event(ses->server->response_q, |
447 | (!(midQ->midState & MID_REQUEST_SUBMITTED)) || | 447 | (!(midQ->midState & MID_REQUEST_SUBMITTED)) || |
448 | time_after(jiffies, timeout) || | 448 | (time_after(jiffies, timeout) && |
449 | time_after(jiffies, ses->server->lstrp + HZ)) || | ||
449 | ((ses->server->tcpStatus != CifsGood) && | 450 | ((ses->server->tcpStatus != CifsGood) && |
450 | (ses->server->tcpStatus != CifsNew))); | 451 | (ses->server->tcpStatus != CifsNew))); |
451 | } else { | 452 | } else { |
@@ -710,9 +711,18 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses, | |||
710 | /* No user interrupts in wait - wreaks havoc with performance */ | 711 | /* No user interrupts in wait - wreaks havoc with performance */ |
711 | if(timeout != MAX_SCHEDULE_TIMEOUT) { | 712 | if(timeout != MAX_SCHEDULE_TIMEOUT) { |
712 | timeout += jiffies; | 713 | timeout += jiffies; |
714 | /* although we prefer not to time out if the server is still | ||
715 | responding - we will time out if the server takes | ||
716 | more than 15 (or 45 or 180) seconds to respond to this request | ||
717 | and has not responded to any request from other threads | ||
718 | on this client within a second (note that it is not worth | ||
719 | grabbing the GlobalMid_Lock and slowing things down in this | ||
720 | wait event to more accurately check the lstrsp field on some | ||
721 | arch since we are already in an error path that will retry */ | ||
713 | wait_event(ses->server->response_q, | 722 | wait_event(ses->server->response_q, |
714 | (!(midQ->midState & MID_REQUEST_SUBMITTED)) || | 723 | (!(midQ->midState & MID_REQUEST_SUBMITTED)) || |
715 | time_after(jiffies, timeout) || | 724 | (time_after(jiffies, timeout) && |
725 | time_after(jiffies, ses->server->lstrp + HZ)) || | ||
716 | ((ses->server->tcpStatus != CifsGood) && | 726 | ((ses->server->tcpStatus != CifsGood) && |
717 | (ses->server->tcpStatus != CifsNew))); | 727 | (ses->server->tcpStatus != CifsNew))); |
718 | } else { | 728 | } else { |