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
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "cifsglob.h" #include "cifsglob.h"
#include "cifsproto.h" #include "cifsproto.h"
#include "cifs_debug.h" #include "cifs_debug.h"
extern kmem_cache_t *cifs_mid_cachep; extern kmem_cache_t *cifs_mid_cachep;
extern kmem_cache_t *cifs_oplock_cachep; extern kmem_cache_t *cifs_oplock_cachep;
...@@ -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,11 +260,13 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses, ...@@ -259,11 +260,13 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,
} }
} }
if(midQ->midState == MID_RETRY_NEEDED) { if (rc != -EHOSTDOWN) {
rc = -EAGAIN; if(midQ->midState == MID_RETRY_NEEDED) {
cFYI(1,("marking request for retry")); rc = -EAGAIN;
} else { cFYI(1,("marking request for retry"));
rc = -EIO; } else {
rc = -EIO;
}
} }
spin_unlock(&GlobalMid_Lock); spin_unlock(&GlobalMid_Lock);
DeleteMidQEntry(midQ); DeleteMidQEntry(midQ);
......
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