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