Commit 7336402f authored by Steve French's avatar Steve French

exit from waiting on smb response when session dead

parent 54aaf1b9
...@@ -2684,11 +2684,11 @@ int cifs_setup_session(unsigned int xid, struct cifsSesInfo *pSesInfo, ...@@ -2684,11 +2684,11 @@ int cifs_setup_session(unsigned int xid, struct cifsSesInfo *pSesInfo,
if(rc == 0) if(rc == 0)
pSesInfo->server->tcpStatus = CifsGood; pSesInfo->server->tcpStatus = CifsGood;
} }
pSesInfo->capabilities = pSesInfo->server->capabilities;
if(linuxExtEnabled == 0)
pSesInfo->capabilities &= (~CAP_UNIX);
pSesInfo->sequence_number = 0;
if (!rc) { if (!rc) {
pSesInfo->capabilities = pSesInfo->server->capabilities;
if(linuxExtEnabled == 0)
pSesInfo->capabilities &= (~CAP_UNIX);
pSesInfo->sequence_number = 0;
cFYI(1,("Security Mode: 0x%x Capabilities: 0x%x Time Zone: %d", cFYI(1,("Security Mode: 0x%x Capabilities: 0x%x Time Zone: %d",
pSesInfo->server->secMode, pSesInfo->server->secMode,
pSesInfo->server->capabilities, pSesInfo->server->capabilities,
......
...@@ -235,8 +235,8 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses, ...@@ -235,8 +235,8 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,
due to last connection to this server being unmounted */ due to last connection to this server being unmounted */
timeout = wait_event_interruptible_timeout(ses->server->response_q, timeout = wait_event_interruptible_timeout(ses->server->response_q,
midQ-> (midQ->midState & MID_RESPONSE_RECEIVED) ||
midState & MID_RESPONSE_RECEIVED, (ses->server->tcpStatus != CifsGood),
timeout); timeout);
if (signal_pending(current)) { if (signal_pending(current)) {
cFYI(1, ("CIFS: caught signal")); cFYI(1, ("CIFS: caught signal"));
...@@ -254,8 +254,8 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses, ...@@ -254,8 +254,8 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,
if(ses->server->tcpStatus == CifsExiting) if(ses->server->tcpStatus == CifsExiting)
rc = -EHOSTDOWN; rc = -EHOSTDOWN;
else { else {
ses->server->tcpStatus = CifsNeedReconnect; ses->server->tcpStatus = CifsNeedReconnect;
midQ->midState = MID_RETRY_NEEDED; midQ->midState = MID_RETRY_NEEDED;
} }
} }
......
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