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

fix error code mapping on bad host

parent 450734dd
/* /*
* fs/cifs/transport.c * fs/cifs/transport.c
* *
* Copyright (C) International Business Machines Corp., 2002,2003 * Copyright (C) International Business Machines Corp., 2002,2004
* Author(s): Steve French (sfrench@us.ibm.com) * Author(s): Steve French (sfrench@us.ibm.com)
* *
* This library is free software; you can redistribute it and/or modify * This library is free software; you can redistribute it and/or modify
...@@ -236,7 +236,8 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses, ...@@ -236,7 +236,8 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,
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)),
timeout); timeout);
if (signal_pending(current)) { if (signal_pending(current)) {
cFYI(1, ("CIFS: caught signal")); cFYI(1, ("CIFS: caught signal"));
...@@ -259,12 +260,14 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses, ...@@ -259,12 +260,14 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,
} }
} }
if (rc != -EHOSTDOWN) {
if(midQ->midState == MID_RETRY_NEEDED) { if(midQ->midState == MID_RETRY_NEEDED) {
rc = -EAGAIN; rc = -EAGAIN;
cFYI(1,("marking request for retry")); cFYI(1,("marking request for retry"));
} else { } else {
rc = -EIO; rc = -EIO;
} }
}
spin_unlock(&GlobalMid_Lock); spin_unlock(&GlobalMid_Lock);
DeleteMidQEntry(midQ); DeleteMidQEntry(midQ);
return rc; return rc;
......
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