Commit eb968ca8 authored by Steve French's avatar Steve French Committed by Steve French

do not allow routine user signals to kill SendReceive wait for response (which...

do not allow routine user signals to kill SendReceive wait for response (which was damaging performance badly)
parent 00f6a975
...@@ -239,18 +239,25 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses, ...@@ -239,18 +239,25 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,
but we still give response a change to complete */ but we still give response a change to complete */
if(midQ->midState & MID_REQUEST_SUBMITTED) { if(midQ->midState & MID_REQUEST_SUBMITTED) {
set_current_state(TASK_UNINTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
timeout = schedule_timeout(HZ); timeout = schedule_timeout(2 * HZ);
} }
} else { /* use normal timeout */ } else { /* using normal timeout */
timeout = wait_event_interruptible_timeout(ses->server->response_q, /* timeout = wait_event_interruptible_timeout(ses->server->response_q,
(midQ->midState & MID_RESPONSE_RECEIVED) || (midQ->midState & MID_RESPONSE_RECEIVED) ||
((ses->server->tcpStatus != CifsGood) && ((ses->server->tcpStatus != CifsGood) &&
(ses->server->tcpStatus != CifsNew)), (ses->server->tcpStatus != CifsNew)),
timeout); timeout); */
/* Can not allow user interrupts- wreaks havoc with performance */
if(midQ->midState & MID_REQUEST_SUBMITTED) {
set_current_state(TASK_UNINTERRUPTIBLE);
timeout = schedule_timeout(timeout);
}
} }
if (signal_pending(current)) { if (signal_pending(current)) {
if (midQ->resp_buf == NULL)
rc = -EINTR; /* BB are we supposed to return -ERESTARTSYS ? */
DeleteMidQEntry(midQ); DeleteMidQEntry(midQ);
return -EINTR; /* BB are we supposed to return -ERESTARTSYS ? */ return rc; /* why bother returning an error if it succeeded */
} else { /* BB spinlock protect this against races with demux thread */ } else { /* BB spinlock protect this against races with demux thread */
spin_lock(&GlobalMid_Lock); spin_lock(&GlobalMid_Lock);
if (midQ->resp_buf) { if (midQ->resp_buf) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment