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

Fix compile error

parent 8f6e29c0
......@@ -77,20 +77,22 @@ smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
for those three - in the calling routine */
if(tcon) {
if((tcon->ses) && (tcon->ses->server)){
struct nls_table *nls_codepage = load_nls_default();
if(tcon->ses->server->tcpStatus == CifsNeedReconnect) {
/* Give Demultiplex thread up to 10 seconds to
reconnect, should be greater than cifs socket
timeout which is 7 seconds */
wait_event_interruptible_timeout(tcon->ses->server->response_q,
(tcon->ses->server->tcpStatus == CifsGood), 10 * HZ);
if(tcon->ses->server->tcpStatus == CifsNeedReconnect)
if(tcon->ses->server->tcpStatus == CifsNeedReconnect) {
unload_nls(nls_codepage);
return -EHOSTDOWN;
}
}
/* need to prevent multiple threads trying to
simultaneously reconnect the same SMB session */
down(&tcon->ses->sesSem);
struct nls_table *nls_codepage = load_nls_default();
if(tcon->ses->status == CifsNeedReconnect)
rc = setup_session(0, tcon->ses, nls_codepage);
if(!rc && (tcon->tidStatus == CifsNeedReconnect)) {
......
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