if(timeout != MAX_SCHEDULE_TIMEOUT) {
timeout += jiffies;
wait_event(ses->server->response_q,
- (!(midQ->midState & MID_REQUEST_SUBMITTED)) ||
- time_after(jiffies, timeout) ||
+ (!(midQ->midState & MID_REQUEST_SUBMITTED)) ||
+ (time_after(jiffies, timeout) &&
+ time_after(jiffies, ses->server->lstrp + HZ)) ||
((ses->server->tcpStatus != CifsGood) &&
(ses->server->tcpStatus != CifsNew)));
} else {
if (in_buf->smb_buf_length > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE - 4) {
up(&ses->server->tcpSem);
- cERROR(1,
- ("Illegal length, greater than maximum frame, %d ",
+ cERROR(1, ("Illegal length, greater than maximum frame, %d",
in_buf->smb_buf_length));
DeleteMidQEntry(midQ);
/* If not lock req, update # of requests on wire to server */
/* No user interrupts in wait - wreaks havoc with performance */
if(timeout != MAX_SCHEDULE_TIMEOUT) {
timeout += jiffies;
+ /* although we prefer not to time out if the server is still
+ responding - we will time out if the server takes
+ more than 15 (or 45 or 180) seconds to respond to this request
+ and has not responded to any request from other threads
+ on this client within a second (note that it is not worth
+ grabbing the GlobalMid_Lock and slowing things down in this
+ wait event to more accurately check the lstrsp field on some
+ arch since we are already in an error path that will retry */
wait_event(ses->server->response_q,
(!(midQ->midState & MID_REQUEST_SUBMITTED)) ||
- time_after(jiffies, timeout) ||
+ (time_after(jiffies, timeout) &&
+ time_after(jiffies, ses->server->lstrp + HZ)) ||
((ses->server->tcpStatus != CifsGood) &&
(ses->server->tcpStatus != CifsNew)));
} else {